We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PdfViewer PrintLargePdf

Hi,

We have a server side print job that concatenates PDFs and converted word documents to a single PDF up to a maximum page size (about 2000 pages). We then use PdfViewer to print the single large PDF using the PrintLargePdf function.

My question is, what does PrintLargePdf actually do. I thought it would be the best option given that we would regularly be printing 1000+ page PDFs, but we also print PDFs of just a few pages and in this situation, it appears to be sending one page at a time to the printer which is a lot slower than printing the entire PDF as one job. We are noticing for a 10 page PDF, that it takes over a minute to print the pages using PrintLargePdf, but with PrintDocument only a few seconds.

We have not yet testing printing PDFs of hundreds of pages but if it’s also going to send one page at a time to the printer, then the printing process will take a very long time.

Regards,

Hi Matthew,

I would like to share with you that PrintLargePdf method allows you to print PDF files with large number of pages or size more than 3 MB. The files smaller than this size could be printed with other methods. Please try to print your files, if size is less than the mentioned, with PrintDocument or PrintDocuementWithSettings methods. If you think the printing process is too slow to work then please share a sample PDF file with us, so we could investigate if the performance can be further improved.

We’re sorry for the inconvenience.
Regards,

Hi,

Yes, we are still finding that printing PDFs is very slow.

Attached is a fairly simple PDF concatenated from 20 single PDFs and totaling 21 pages.

Executing the below method, the windows printer tray icon shows and opening that we see that there is a job spooling pages to the printer. We see the page count go up very slowly and after about 40 seconds to 1 minute, it completes spooling the 21 pages and finally prints.

public static void Print(string inputFile, string printerName)
{
PrinterSettings settings = new PrinterSettings();
settings.PrinterName = printerName;

PdfViewer viewer = new PdfViewer();
viewer.Resolution = 300;
//viewer.PrintLargePdf(inputFile, settings);
viewer.OpenPdfFile(inputFile);
viewer.PrintDocumentWithSettings(settings);
}

Hi Matthew,

We’re investigating this issue at our end and you’ll be updated with the results accordingly.

We’re sorry for the inconvenience.
Regards,

Hi Matthew,

We have investigated this issue at our end in detail and noticed that the attached sample file takes about 1 minute and 03 seconds for spooling when using 300 as Resolution value; however, it took only 32 seconds when using default resolution i.e. 150.

I would like to share with you that PdfViewer generally allows you to print one page per two seconds when using default resolution value; this time might be a little higher depending upon the complexity of the contents of the particular PDF files. However, if you specify a higher resolution value, the speed will definitely be slower. Please have a look at the description of the Resolution property.

I hope you understand. If you have any further questions or concerns, please do let us know.
Regards,

Hi,

Thanks for the reply…

We are aware of the difference that the resolution property makes, but we needed to increase this value because some of our word documents which we convert to PDF contain barcodes and using the default resolution of 150 and printing via PDF, these barcodes were fuzzy and not able to be scanned with barcode readers. Increasing to a resolution of 300 meant we were able to scan printed barcodes…

We found that printing via the Words package, we were able to print bulk documents very quickly and the print quality was perfect, so probably have no choice but to go this direction. The catch here is that we can specify PDFs to be printed along with the word documents so we’ll need to convert PDFs to docs (by inserting the PDF image into the document) which reduces the quality of the PDF and is a little slower than going the other direction.

Hi Matthew,

We’re very sorry for the inconvenience caused due to this limitation. If you want to convert the PDF to images, you can use PdfConverter class. Moreover, if you find any further questions or need assistance, please do let us know.

Regards,

Hi,

Thanks for the reply.

The only other thing to add on this issue is that loading the concatenated PDF (from my previous post) in Foxit and printing spools very quickly and the print quality is great where the barcode is very clear and the same quality as printing the original document through Aspose.Words directly.

Not sure why there would be such a difference…

Cheers,

Hi Matthew,

I agree with you that the print quality, while printing the PDF with PdfViewer, is not as good as with the Adobe Reader. The reason is that PdfViewer prints the pictures converted from the PDF file. That is why it is recommend in the PdfViewer description that you make sure it satisfies your printing requirements.

We’re sorry for the inconvenience. If you have any further questions, please do let us know.
Regards,

Hi Matthew,

We have logged an issue as
PDFKITNET-19394 in our issue tracking system to improve print quality and the processing speed. Our team will look into this issue and you’ll be updated once it is resolved.

Regards,

Hi Matthew,

Could you please share with us a pdf document sample with the barcode issue.

The document you have attached doesn't contain barcode, but we need it to reproduce and fix this issue.

Thanks,

Hi,

I’ve attached a PDF with a barcode in it.

Printing to our default A4 printer (Xerox C2200) using the below code, the barcode cannot be scanned in the first print, but with the second it can.

It should be noted that while the second print can be scanned, it is still far from clear compared to printing via Adobe or Foxit, but the thin lines in the barcode are JUST clear enough to be discernible compared to the first where they blur together.

private void PrintBarcodePdf()
{
PdfViewer viewer1 = new PdfViewer();
viewer1.OpenPdfFile(“Barcode.pdf”);
viewer1.PrintDocument();

PdfViewer viewer2 = new PdfViewer();
viewer2.Resolution = 300;
viewer2.OpenPdfFile(“Barcode.pdf”);
viewer2.PrintDocument();
}

Regards,

Hi Matthew,

Thank you very much for sharing the sample file. Our team will further investigate this issue and you’ll be updated accordingly, once it is fixed.

If you find any further questions, please do let us know.
Regards,

The issues you have found earlier (filed as 19394) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan