Print Error

Hello,



I have used Aspose PDF to add form fields to the attached PDF. When printing I am getting the following error:



An error exists on this page. acrobat may not display the page correctly



The printing happens successfully, but the above error is shown. This only occurs the first time you try to print - subsequent times it does not happen. If you close and re-open the file, the error happens when printing the first time.



Thanks for any help that can be provided!



Bill

Hi Bill,

Thanks for your inquiry. I have tested the printing scenario with your shared PDF using Aspose.Pdf for .NET 11.7.0 and unable to notice the reported issue. I will appreciate it if you please download and try latest version of Aspose.Pdf for .NET, hopefully it will resolve the issue.

// Open input PDF file
viewer.BindPdf("D:/downloads/GP5124NM.pdf");

// Set attributes for printing
viewer.AutoResize = true; // Print the file with adjusted size
viewer.AutoRotate = true; // Print the file with adjusted rotation
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();

// Set XPS/PDF printer name
// ps.PrinterName = "Microsoft XPS Document Writer";
// or set the PDF printer
ps.PrinterName = "Adobe PDF";

// Set PageSize (if required)
pgs.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1169);

// Set PageMargins (if required)
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 printing
viewer.Close();

Best Regards,

XinnBill:
Hello,

I have used Aspose PDF to add form fields to the attached PDF. When printing I am getting the following error:

An error exists on this page. acrobat may not display the page correctly

The printing happens successfully, but the above error is shown. This only occurs the first time you try to print - subsequent times it does not happen. If you close and re-open the file, the error happens when printing the first time.

Thanks for any help that can be provided!

Bill

Hi Bill,

Adding more to Tilal’s comments, can you please share some details on how you are trying to print the document i.e. Either printing the file using PdfViewer class of Aspose.Pdf for .NET or using Print feature inside Adobe Reader.

PS, I have tried printing earlier shared PDF file to HP LaserJet and Microsoft XPS Document Writer and I am unable to notice any error message.

Apologies is I was not clear - the attached document throws this error when printing from Adobe Reader. We are using version XI (latest version)

Hi Bill,


Thanks for sharing the additional information. I have again tested printing shared PDF using both Adobe Reader XI(11.0.10) and Adobe Acrobat XI(11.0.0) and unable to notice the reported issue, please find sample printout of Adobe Reader XI. We will appreciate it if you please share your Adobe Reader version and environment details, so we will try to replicate the issue and will provide you information accordingly.

We are sorry for the inconvenience caused.

Best Regards,