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.

Tue Oct 16, 2018 9:30 am

Hello,
I'm having an issue where printing a pdf file with 20 pages takes at least 5 minutes to print. To test it I split the 20-page pdf and wrote the code below to print a single page from it and the printing process took about 15 seconds.
I have tested it with the latest Hotfix version (4.9.7).

Code: Select all
PdfDocument doc = new PdfDocument(@"C:\Users\user\Desktop\example.pdf");
doc.PrintSettings.PrinterName = "someprinter";
doc.Print();


I also searched for some solutions and tested the XPS printer example which was posted on other threads (http://www.e-iceblue.com/forum/post26172.html?hilit=slow#p26172).
But the Quality of the printout was very poor (parts of the pages were moved).

I'll send the single page pdf file which took 15 seconds to the support email since the pdf file with 20 pages contains sensitive data.

PMOAME
 
Posts: 4
Joined: Tue May 16, 2017 3:22 pm

Tue Oct 16, 2018 12:01 pm

Dear,

Thank you for contacting us.
I printed your Pdf file with HP LaserJet P1007, it costs around 6 seconds to finish the printing by our Spire.PDF and around 2 seconds by the XpsPrintHelper. I still didn’t find the poor quality issue. I attached the screenshots of printing results to your email for your reference. Compared them with the result that printed by Adobe, no difference can be found. To help us further investigate your issue, please provide your system information (e.g. windows 7, 64-bit), the region setting (e.g. China, Chinese) as well as your print result. Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Tue Oct 23, 2018 7:46 pm

Hello Support,

I have the same issue.
If I use doc.print() method, it takes up to 10 seconds to print one page.
If I use doc.printdocument.print() method (not recommended) then printing is fast but I have a pop-up window about being printed page.
What is the difference between these two methods and is any way to eliminate pop-up window?

alexo
 
Posts: 2
Joined: Tue Oct 23, 2018 7:25 pm

Wed Oct 24, 2018 8:51 am

Hi,

Thanks for your inquiry.
To help us better investigate the slow printing issue, please provide your testing PDF file. You could send it to us via email (support@e-iceblue.com).
About the difference between the two methods, actually, we made adjustments about print, the doc.PrintDocument.Print() was abandoned and it only exists in our old/free Spire.PDF now. The doc.Print() is the updated method in newer commercial version. To eliminate the pop-up window, please add the following code.
Code: Select all
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile("sample.pdf");
//Add this line to eliminate pop-up window
pdf.PrintSettings.PrintController = new StandardPrintController();
pdf.Print();


Sincerely
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Mon Oct 29, 2018 8:13 pm

Hello,

This is not an issue with a specific PDF file. For testing I used one of projects from your Web-site.
I sent you my test project for investigation via email (support@e-iceblue.com) with explanation.
Please let me know if you got my e-mail.

Thank you.

alexo
 
Posts: 2
Joined: Tue Oct 23, 2018 7:25 pm

Tue Oct 30, 2018 6:23 am

Hi,

Thanks for your feedback.
I have received your email and noticed that using doc.Print() method to print is slower than using the doc.PrintDocument.Print() method in free version. I have posted the behavior to our Dev team. They will do further investigations. If there is any update, we will let you know. We apologize for the inconvenience caused.

Sincerely
Anna
E- iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Wed Nov 28, 2018 3:56 am

Hi,

Thanks for your patient waiting.
Glad to tell you that the speed of doc.Print() method in commercial version has been improved (around 25%) after doing optimization. You could download the hotfix from the following link. You will see that the speed of doc.PrintDocument.Print() in free version is still faster than that of doc.Print() in commercial version, that’s because the commercial and free versions use different printing instructions, the printing instructions of the commercial version is more complete and reasonable. Thanks for your understanding.
Spire.PDF Pack(Hot Fix) Version:4.11.12

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Tue Dec 10, 2019 3:00 pm

I have a very similar issue.
My application creates, combines and then prints pdfs. Everything works well and quick right up until the .Print method. At this point it can take over 1 minute to sent to the printer. Opening up the generated pdf in Actobat and printing from there takes a few seconds.
I am using version 5.11.2.2040 of the commercial version.
Is this something you are aware of?
Is Printing speed still being optimised and if so is there a timescale?

Regards
Martin

martinb13
 
Posts: 4
Joined: Sun Feb 02, 2014 11:08 am

Tue Dec 10, 2019 5:58 pm

martinb13 wrote:I have a very similar issue.
My application creates, combines and then prints pdfs. Everything works well and quick right up until the .Print method. At this point it can take over 1 minute to sent to the printer. Opening up the generated pdf in Actobat and printing from there takes a few seconds.
I am using version 5.11.2.2040 of the commercial version.
Is this something you are aware of?
Is Printing speed still being optimised and if so is there a timescale?

Regards
Martin


I worked around this issue by simply exporting all pages of the combined pdf as an image and then printing those images which had a huge impact on the printing speed. It took less than 5 seconds to print 30+ pages. It's kinda dirty but it was by far the fastest thing I've tested.

Regards
Peter

PMOAME
 
Posts: 4
Joined: Tue May 16, 2017 3:22 pm

Wed Dec 11, 2019 2:35 am

Hi Martin,

Thanks for your inquiry.
Now the latest version is Spire.PDF Pack(Hot Fix) Version:5.12.3 which has more improvements than old version in general. Please first try this version. If the issue still happens, to help us investigate your issue accurately, please provide following information:
1. The related files(if any)
2. The full code you were using

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Mon Jan 20, 2020 8:29 am

Hi Martin,

Hope you are doing well.
Has your issue been resolved? If not, please provide the related files and the code you were using for further investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Return to Spire.PDF