I want to print a specific page of a pdf file. In the example, I have a pdf with 4 pages and I want to print the third page. I am using Apache PDFBox lib. I tried to delete pages other than the ones I want to print, but now it prints all the other pages except the ones I want to print ... any help?
There is my function code that I wrote:
void printPDFS(String fileName, int i) throws PrinterException, IOException{ PrinterJob printJob = PrinterJob.getPrinterJob(); printJob.getPrintService();
I added this line to the code: System.out.println(doc.getPageMap());
The console gives me: {13,0=4, 1,0=2, 7,0=3, 27,0=1} what does this mean?
source share