How to make PDF generation faster

Stimulsoft Reports.NET discussion
Post Reply
nirav.blitzm
Posts: 8
Joined: Sun Jan 19, 2025 9:45 pm

How to make PDF generation faster

Post by nirav.blitzm »

Hi,

I am generating a PDF report of 2000 pages containing 2 images in the header and footer and a lot of text. The designer report .MRT file has 2 pages.
The PDF file generation takes around 6 to 10 minutes.

Using Stimulsoft.Reports.Engine.NetCore - 2025.1.3

Code: Select all

MemoryStream result = null;
using MemoryStream stream = new MemoryStream();

var report = StiReport.CreateNewReport();
report.LoadDocumentFromString(path);
report.Dictionary.Databases.Clear();
report.RegData("root", data);
await report.RenderAsync();
var service = new StiPdfExportService();
var settings = new StiPdfExportSettings { ImageResolution = 300 };

service.ExportPdf(report, stream, settings);
result = new MemoryStream(stream.ToArray(), false);

Is there any way I can make the PDF generation faster? I am running a server with 5 GB memory & 2 CPU cores. Can I know if changing physical machine configurations running the server make PDF generation faster? I noted that the Stimulsoft PDF report with 2000 pages takes 1 CPU core and 1 GB of memory.

Sorry for a lot of questions, I am trying to identify how to make PDF generation faster. Is it my code or physical config restriction slowing down Stimulsoft.

Cheers
Lech Kulikowski
Posts: 7333
Joined: Tue Mar 20, 2018 5:34 am

Re: How to make PDF generation faster

Post by Lech Kulikowski »

Hello,

Without a sample that reproduces the issue, it is difficult to say something about the issue.

Also, please check
https://www.stimulsoft.com/en/blog/arti ... ng-reports
https://www.stimulsoft.com/en/blog/arti ... rts-part-2
https://www.stimulsoft.com/en/blog/arti ... rts-part-3

Thank you.
Post Reply