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

Free Support Forum - aspose.com

PDF printing doesn't work correctly

Hi,


I tried to use your code sample to print a PDF, but it is printed incorrectly. Page orientation is opposite no matter whether I set AutoRotate to true or false, plus the quality is really terrible. Check the attached file and printed output. I have a single printer configured.

//Create PdfViewer object
com.aspose.pdf.facades.PdfViewer viewer = new com.aspose.pdf.facades.PdfViewer();

//Open input PDF file
viewer.openPdfFile(“input.pdf”);

//Set attributes for printing
viewer.setAutoResize(true); //Print the file with adjusted size
viewer.setAutoRotate(true); //Print the file with adjusted rotation
viewer.setPrintPageDialog(false); //Do not produce the page number dialog when printing

//gets a printjob object.
PrinterJob printJob = PrinterJob.getPrinterJob();
//gets the default page.
PageFormat pf = printJob.defaultPage();

// print PDF document
viewer.printDocument();
//close the Pdf file.
viewer.closePdfFile();


Thanks in advance for any help.
Mariusz

Hi Mariusz,


Thanks for contacting support.

I
have tested the scenario using Aspose.Pdf for Java 9.1.0 and I am getting OutOfMemoryError when trying to print the PDF file. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWJAVA-34292. We will
investigate this issue in details and will keep you updated on the status of a
correction.

We apologize for your inconvenience.

Hello,

has this been resolved with Apose.Pdf for Java 9.7.0? I have the same issues with this version (wrong page orientation, terrible quality).

Regards
Paul

Hi Paul,


Thanks for contacting support.

I am afraid the earlier reported issue is not yet resolved. Also please note that the earlier reported issue is regarding OutOfMemory Exception occurring during PDF printing.

However can you please share your source PDF files so that we can explicitly test your scenarios and share our findings. We are sorry for this inconvenience.

Please find my test document attached. I can reproduce the issues of mariuszpala (“Page orientation is opposite no matter whether I set AutoRotate to true or false, plus the quality is really terrible.”) with it.

I also attached a picture of the printed result.

Hi Paul,


Thanks for sharing your source document. We have managed to notice both printing issues, orientation and quality. So logged these issue as following in our issue tracking system for further investigation and resolution. We will notify you as soon as we resolve these.

PDFNEWJAVA-34634: Print orientation issue.
PDFNEWJAVA-34635: Print quality issue.

We are sorry for the inconvenience caused.

Best Regards,

Hello,


For the application that I am working on I need to programatically assemble and print some PDF documents from the application, and for this purpose I have added Aspose.PDF 9.7.1 for Java to my project.

Assembling a document works just like fine, but when it comes to printing I am experiencing exactly the same problem as Mariusz, the sample code you provide just does not work. The print quality is really really bad and page orientation is ignored. The page comes out rotated 90 degrees counter-clockwise, only one third of the page is shown and the quality is really bad.

I see that you have logged those two issues past December. Have they been resolved?

Best regards,
Ivan

Hi Ivan,


Thanks for your inquiry. I am afraid above reported printing issues are still not resolved. However we have also raised the issues’ priority. Our development team is working over the issues and we will notify you as soon as these are resolved.

We are sorry for the inconvenience caused.

Best Regards,
tilal.ahmad:
Hi Paul,

Thanks for sharing your source document. We have managed to notice both printing issues, orientation and quality. So logged these issue as following in our issue tracking system for further investigation and resolution. We will notify you as soon as we resolve these.

PDFNEWJAVA-34634: Print orientation issue.
PDFNEWJAVA-34635: Print quality issue.

We are sorry for the inconvenience caused.

Best Regards,


Hi,

I would like to move these two issues to the priority support forum. Do I have to create a new post in that forum?

Best Regards
Paul

I have created this thread for the two issues.

Regards
Paul

Hi Paul,


Thanks for your inquiry. As requested, we have raised the issue priority of above reported issues to “Priority Support” and we will keep you updated about these issues’ resolution in Priority support forum post.

Thanks for your patience and cooperation.

Best Regards,

Hi,

A quick question, in what version did the
PDFNEWJAVA-34635: Print quality issue. was addressed?

Thanks

The issues you have found earlier (filed as PDFNEWJAVA-34292) have been fixed in Aspose.Pdf for Java 10.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(1)

Hi Paul,


Thanks for your patience.

The development team started investigating the issue PDFNEWJAVA-34635 reported earlier but during the resolution, we have observed some other related problems and they have been separately logged in our issue tracking system. Also please note that the priority of this issue has already been set to high and team is investigating the issue accordingly.

As soon as we have some definite updates regarding its resolution, we will let you know.

The issues you have found earlier (filed as PDFNEWJAVA-34634) have been fixed in Aspose.Pdf for Java 11.0.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as PDFNEWJAVA-34635) have been fixed in Aspose.Pdf for Java 11.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.