Results 1 to 1 of 1
Thread: PdfBox: Fit to Printable Area
- 03-25-2011, 09:16 AM #1Member
- Join Date
- Jan 2011
- Rep Power
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(); paper.setSize(594.936, 841.536); double margin = 36; // half inch paper.setImageableArea(margin, margin, paper.getWidth() - margin * 2, paper.getHeight() - margin * 2); pForm.setPaper(paper);
- By vammpiro in forum Advanced JavaReplies: 1Last Post: 03-09-2012, 03:54 PM
- By umadas in forum Advanced JavaReplies: 15Last Post: 01-21-2012, 08:47 AM
- By siragott in forum NetBeansReplies: 0Last Post: 12-04-2010, 10:18 AM
- By r00tb33r in forum AWT / SwingReplies: 0Last Post: 06-16-2010, 06:29 AM