Op 10/05/2012 14:21, [email protected] schreef:
Having explained the above, I think I need to research Paulo's advice
Yes, reading your follow-up mail, I realize that I misunderstood your
question.
Changing the page boundaries using PdfReader and PdfStamper is the way
to go.
Go to page 442 of the book. There's an example there that explains how
to change the rotation angle of a page. Remove the line
pageDict.put(PdfName.ROTATE, new PdfNumber(rot + 90)); and experiment
with pageDict.getAsArray(PdfName.MEDIABOX); and
pageDict.getAsArray(PdfName.CROPBOX);
Not all PDF pages will have a Crop Box (see page 145 and following), but
they'll sure have a Media Box.
What you want to do, is to replace the existing Media Box (and Crop Box
if it's not null) with a larger rectangle (note that rectangles are
expressed as arrays).
This is done like this:
pageDict.put(PdfName.MEDIABOX, rect);
Where rect is an instance of PdfArray with 4 values (the coordinates of
the lower left corner and the upper right corner of a rectangle).
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php