I am using a PDFBox 1.8.3 jar to print a PDF file in a printer (HW). I printed the PDF file in the usual manner and in the normal mode. When I print a PDF using the usual method, I received the original pdf file as a printed document. But when I use my code, I can not get the source pdf file as printed output. I see a couple of changes in the print file; for example, alignment, font, and ink are different from the original document.
ReadPDF readPDF = new ReadPDF(); PDDocument document = readPDF.loadPdf(path); document.addPage(new PDPage()); printerJob.setPageable(document); printRequestAttributeSet.add(new PageRanges(1,3)); printerJob.print(printRequestAttributeSet);
I am also trying to raise the value of jpg 1.8B in the PDFBox to the upcoming jar 2.0.0. I ran into several difficulties (for example: in PDFBox 2.0.0 I cannot use printerJob.setPageable(document); ). Could you help me solve this problem.
source share