Hello,
I am currently using the PdfWriter / PdfReader for merging existing Pdf
documents, the process that is discussed frequently on the list. This is
working fine for me, however 1 requirement that I have for my project
is, I have to fit all merged pages into a standard orientation
(Portrait) and page size (PageSize.LETTER). My question is, how does the
rotation value from PdfReader.getPageSizeWithRotation return value play
into this process. For example, I have 2 different Pdf's that I am
working with, descriptions are as follows:
1. PageSize is Letter. Orientation (in acrobat reader) is landscape.
getPageSizeWithRotation returns a rotation as 0. I interpret this
as the page was created to be landscape and due to this, the
rotation is set to 0. This scenario works works fine for me,
because I check to see if the width > height when determining if
page needs to be rotated.
2. A bit more complex. Pdf consists of 6 viewable pages spread across
2 "physical" pages. E.g. I open in Reader, I see the 6 different
pages, however opening Pdf in Photoshop (using MediaBox) I get the
2 "physical" pages. Photoshop opens the pages in the proper
orientation, however it appears as if getImportedPages is
returning a rotated value. The getPageSizeWithRotation returns a
rotation as 270, and the CropBox has a rotation of 0. However, the
CropBox's width/height values tells me the orientation reflects a
rotated value (width > height)
What I am trying to figure out, is if the getPageSizeWithRotation
().getRotation() value should be used in my algorithm to determine if I
should rotate the page, and if so, how to handle the CropBox's
width/height values, or if I should strictly use the if (width > height)
determination.
Any help on the subject would be greatly appreciated considering I have
been working on this issue for 5 days now.
Thanks,
Jordan S. Jones
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions