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 25, 2016 1:37 pm

I have the following problem, I get a base64 string, record a PDF file and load the loadFile () using the PdfDocument spire.pdf, printing is very slow. Picking up the same file and printing with Adobe Reader there is the option to Print as image, deselecting this printing option is very fast. Is there a way to do this by the component?

The printer is used lexmark ms811dn

douglasalonso
 
Posts: 10
Joined: Tue Oct 25, 2016 1:18 pm

Wed Oct 26, 2016 3:56 am

Dear douglasalonso,

Thanks for your inquiry. Could you please provide us your base64 string pdf file to help us look into it ?

Thanks,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Thu Oct 27, 2016 2:07 am

Unfortunately I do not permit the company to pass the string 64 because they are sensitive data.

Still thank you and excuse the English by google translator

douglasalonso
 
Posts: 10
Joined: Tue Oct 25, 2016 1:18 pm

Thu Oct 27, 2016 9:06 am

Hi douglasalonso,

You could only provide a sample file to show the issue.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Tue Nov 01, 2016 5:13 pm

I sent a sample file

I did another test, using PDFDocument.SaveFile () and then SaveDialog, the PDF file is generated it is as an image format.

I have another PDF file generated by the reporting services this saving by SaveDialog maintains PDF text format.

I believe this is the problem of delays in printing, the files generated by PDFDocument.Print are added in Windows print queue, but between an impression and another the printer takes a few seconds to start the next printing.

The printer lexmark ms811dn has the capacity to print 60 pages per minute, however this printing 20

douglasalonso
 
Posts: 10
Joined: Tue Oct 25, 2016 1:18 pm

Wed Nov 02, 2016 7:35 am

Hi douglasalonso,

I am sorry that I don't understand the method to generate the pdf as an image format. Could you please provide us your snip codes to help us do an investigation?

Thanks,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Wed Nov 02, 2016 12:42 pm

Hi,

this is the code I'm using to send to printer

PdfDocument doc = new PdfDocument();
byte[] bytes = Convert.FromBase64String(base64String);
doc.LoadFromBytes(bytes);
doc.PrintDocument.DocumentName = fileName;
doc.PrintDocument.PrinterSettings.PrinterName = printerName;
doc.PrintDocument.Print();

The system sends it to the print queue, every two or three sheets printed the printer will stop a few seconds to start a new printing.

One of the tests we did was convert this array into a file and save it to disk, then upload the file and send to print. Using spire.pdf had the same problem of slow, the other test was open and print the adobe reader was too slow, we can only change the print speed going in preferences Adobe Reader and unchecking the checkbox print as picture, I am sending attachment the image with this option the printer prints straight without stopping

douglasalonso
 
Posts: 10
Joined: Tue Oct 25, 2016 1:18 pm

Thu Nov 03, 2016 6:59 am

Hello,

Thanks for the information. Exactly, our product prints the pdf document in the image way. And here is another way you could try.
Code: Select all
MemoryStream ms = new MemoryStream();
PdfDocument pdfDoc = new PdfDocument();
pdfDoc.LoadFromFile(fileName);
pdfDoc.SaveToStream(ms, FileFormat.XPS);
ms.Position = 0;
XpsPrint.XpsPrintHelper.Print(ms, @"\\192.168.1.104\HP LaserJet P1007", "SpireTest",true);

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Nov 03, 2016 11:18 am

Thank you for your attention, so complete the test send the result to you.

douglasalonso
 
Posts: 10
Joined: Tue Oct 25, 2016 1:18 pm

Wed Nov 09, 2016 7:26 am

Hello,

Have you tested the codes? How is your issue now? Could you please give us some feedback at your convenience?

Thanks,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Mon Nov 21, 2016 3:29 pm

Hello,

Sorry for the delay to respond, we did the test with the option to print in XPS, for some reason in the network printer did not work. I returned to the previous solution using spire.pdf, after several tests and monitoring the external calls of the system, we came to the conclusion that the component spire.pdf is printing perfectly within the expected, we had an improvement also when we installed the universal driver more Current lexmark and lastly we did a final test on the printer model that the documents will print and the printing speed was very satisfactory.

Thank you very much for your attention.

Att,

Douglas Alonso Cruz

douglasalonso
 
Posts: 10
Joined: Tue Oct 25, 2016 1:18 pm

Tue Nov 22, 2016 6:29 am

Hello,

Thanks for your feedback. Please feel free to contact us if you have any questions and requests.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF