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 objectcom.aspose.pdf.facades.PdfViewer viewer = new com.aspose.pdf.facades.PdfViewer();//Open input PDF fileviewer.openPdfFile("input.pdf");//Set attributes for printingviewer.setAutoResize(true); //Print the file with adjusted sizeviewer.setAutoRotate(true); //Print the file with adjusted rotationviewer.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 documentviewer.printDocument();//close the Pdf file.viewer.closePdfFile();
Thanks in advance for any help.
Mariusz