Slow printing on network printer

Hi,

we use Aspose.PDF for printing PDF documents at printer. A customer complained to us, that printing PDF directly from our product is slow (more specifically, we noticed, that the PDF document prints each page seperately). After lengthy investigation, we deduced that the problem is in ASPOSE.PDF when it is printing the document to a Network printer. Ironically, if the network printer gets normally installed by using the Printer CD, the printing over ASPOSE.PDF is fast. Side note: we use Windows 10. This problem does not happen, if for example the document is printed using ADOBE!

More over, we debugged the code we use for printing and we noticed that the execution of the code is fast, so no delay there. See the code snippet please below!

We noticed following points:

  • if printer is added over the “Add printer & scanners” option of Windows 10, printing is very slow (each page is printed seperately; there is a lengthy break between the pages). Additionally, we see that the size of the document in the printer queue gets too big (eg. from 200 KB to 3.6 MB)
  • if printer is installed by using the printer CD, the size of the document in the printer queue is normal (a little bit bigger). Printing is fast.
  • UPDATING TO THE LATEST VERSION OF ASPOSE DID NOT SOLVE THE PROBLEM

Please help us out. This problem is very hot right now!

Code for printing:​​

PdfViewer viewer = new PdfViewer();

// Open input PDF file
viewer.BindPdf(pdfFileName);

// Set attributes for printing
//viewer.AutoResize = true; // Print the file with adjusted size
viewer.PrintPageDialog = false; // Do not produce the page number dialog when printing

// Create objects for printer and page settings and PrintDocument
System.Drawing.Printing.PrinterSettings ps = new System.Drawing.Printing.PrinterSettings();
System.Drawing.Printing.PageSettings pgs = new System.Drawing.Printing.PageSettings();
System.Drawing.Printing.PrintDocument prtdoc =
new System.Drawing.Printing.PrintDocument
{
PrinterSettings =
{
PrinterName = printerName,
Copies = (short) copiesCount
}
};

// Set printer name
ps.PrinterName = prtdoc.PrinterSettings.PrinterName;

// Set PageMargins (if required) -> required, otherwise the page looks bad
pgs.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);

// Print document using printer and page settings
viewer.PrintDocumentWithSettings(pgs, ps);

// Close the PDF file after priting
viewer.Close();​

@it_schuhfried

Thank you for contacting support.

Would you please share a sample PDF file with us so that we can check the contents of PDF file. Also mention the difference, in terms of time, between file printed with Aspose.PDF API and the time for printing it without Aspose.PDF API. Moreover, please share a screenshot how you notice it appearing page by page in printing queue so that we may reproduce and investigate it in our environment.

Hi,

PDF file is attached => Printed PDF File.pdf

Attached is also a screenshot of the printer queue, you can see that the size of the document is much bigger than the actual size (4.81 MB compared to 275 KB).

The time diffs were following:
Our product using ASPOSE => total printing around 1:30 mins, delay between each page. The delay is around 5 seconds…
Printing by PDF viewer => around 10-20 seconds, all pages printed without delay

Printed PDF file.pdf (275.1 KB)
print queue.PNG (10.3 KB)

@it_schuhfried

Thank you for sharing requested data.

We have logged an investigation ticket with ID PDFNET-45183 in our issue management system. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

Hi,

I seem not to be able to login into the ticket system to view the ticket? Do you maybe know why?

@it_schuhfried

We are afraid that you may not access our internal issue tracking system (JIRA). However, you may inquire about issue progress in this thread or you can view issue status from bottom left column, under this thread.

Hi Farhan,

any news regarding this? Would be great to know what the timeplan is.

Thanks

@it_schuhfried

The issue reported by you has been logged in our issue management system about a week ago. Currently, it is pending owing to previously logged tickets and will be investigated on its due turn, which can take a few months. We appreciate your patience and comprehension in this regard.

I am working in an IT firm and I am using MS Office version 2013 and Canon printer for my work. When I was working on an urgent project I got it was very slow and showed an error message written as [Refill Canon Printer’s Ink]. But I checked that the ink was there in the cartridges to work more. Can anyone say why it is coming like that?

@oliviaadley

Thank you for contacting support.

Would you please elaborate which Aspose API are you working with, while sharing sample code snippet and respective files so that we may investigate and assist you accordingly.