Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Sep 02, 2020 4:54 am

Hi,

Just tried your latest version 6.8.5 as we have performance issues with printing PDFs.

I have 50 1-3 page PDFs. If I write a loop to create a PdfDocument, load the PDF, and print it (using out of the box settings), it's taking over 2 minutes to print. If I use PrintDocument.Print() instead, it completes in under 70 seconds. Seems the first page is painfully slow to print, and it's very common for the PDFs to contain just a single page.

We need to have high-performance printing due to high volumes of PDFs that we have to load and print. With some timings added around the pdf.Print() method (below), I can see some 1 page documents take 4 seconds to print. Why so long?

Why is the old PrintDocument.Print() so much faster? I've read similar posts in the past about this, but it still seems broken and very slow.

I've also tried loading the same documents into Adobe Reader and print to PDFCreator - they all take 1 second or less, even the 3 page ones. Why is there such a performance difference?

Code for testing is this (using PDFCreator just for simple tests - speed is just as bad with actual printers).
Code: Select all
           
foreach (var file in files)
            {
                using (var pdf = new PdfDocument())
                {
                    pdf.LoadFromFile(file);
                    pdf.PrintSettings.PrinterName = "PDFCreator";
                    pdf.PrintSettings.Collate = true;
                    pdf.PrintSettings.Copies = 1;
                    pdf.PrintSettings.Duplex = Duplex.Default;
                    pdf.PrintSettings.PrintController = new StandardPrintController();

                    pdf.Print();
                }
            }


Regards.
Haydn

hrp
 
Posts: 3
Joined: Wed Jun 27, 2018 11:38 am

Wed Sep 02, 2020 8:12 am

Hi Haydn,

Thanks for your inquiry.
Could you please provide your files for accurate investigation? You could upload the files here or send to us([email protected]) via email.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Sep 03, 2020 4:43 am

Thanks Betsy,

I've just emailed now with an example that takes 4-8 seconds to print (1 page PDF), or 3-7 using PrintDocument.Print(), compared to 1 second with Adobe.

Regards.

hrp
 
Posts: 3
Joined: Wed Jun 27, 2018 11:38 am

Thu Sep 03, 2020 7:15 am

Hi,

Thanks for your email.
After testing, I found the method PdfDocument.Print() cost about 6s to print that PDF while PrintDocument.Print() cost 2s to print on my side. I have logged this issue in our bug tracking system with the ticket SPIREPDF-3559. Sorry that I cannot tell you the reason now, and our Dev team will look into it. Once there is any update, we will let you know.
Sorry for the inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Feb 18, 2021 11:14 pm

Any updates on this issue?

What is the result of this ticket: SPIREPDF-3559

We are experiencing this issue with v4.6.1.2040.

Thanks,

daniel.dority
 
Posts: 14
Joined: Thu Jan 11, 2018 2:57 pm

Fri Feb 19, 2021 3:04 am

Hello,

Thanks for your inquiry!

Our latest Spire.PDF V7.2.5 made some improvements in print speed. I recommend that you use the latest version.

If the issue still exists, please provide us with your input file for further investigation. Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Mar 05, 2021 8:57 am

Hello,

Hope you are doing well!

How is the issue now? If it still exists, could you please provide your input file to us for further investigation?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Mar 30, 2021 1:10 pm

We downloaded the newest version and tested the printing speeds. It was not an issue. We are in the process of upgrading to the newest version.

Thanks,

daniel.dority
 
Posts: 14
Joined: Thu Jan 11, 2018 2:57 pm

Wed Mar 31, 2021 1:17 am

Hello,

Thanks for your feedback!

Glad to hear that your issue has been solved.

If you encounter any issues related to our product in the future, just feel free to contact us.

Have a nice day!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF