PdfBox: Fit to Printable Area
I'm using Pdfbox to print pdf's and I can successfully send pdf's to my printer. However I'm running into trouble when I want to scale the image and no matter what I do I cannot alter the contents of my pdf I am only able to set a margin and reduce the imageable area without reducing the size of the contents to fit into my page.
Is it possible with Pdfbox to scale the pdf to fit into my printable area?
PageFormat pForm = new PageFormat();
Paper paper = new Paper();
double margin = 36; // half inch
paper.setImageableArea(margin, margin, paper.getWidth() - margin * 2, paper.getHeight() - margin * 2);