Results 1 to 1 of 1
Thread: PdfBox: Fit to Printable Area
- 03-25-2011, 09:16 AM #1
Member
- Join Date
- Jan 2011
- Posts
- 2
- Rep Power
- 0
PdfBox: Fit to Printable Area
Hi there,
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?
thanks,
faoilean.
Java Code: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);
Similar Threads
-
pdfbox to overwrite image on a pdf
By vammpiro in forum Advanced JavaReplies: 1Last Post: 03-09-2012, 03:54 PM -
Reading text using PDFBOX
By umadas in forum Advanced JavaReplies: 15Last Post: 01-21-2012, 08:47 AM -
Problems with import PDFBox
By siragott in forum NetBeansReplies: 0Last Post: 12-04-2010, 10:18 AM -
printable area mismatch between Java & C++ possible?
By r00tb33r in forum AWT / SwingReplies: 0Last Post: 06-16-2010, 06:29 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks