|
|
| "be consistent" | |
| PerlMonks |
Re: Determining a PDF's orientationby JamesNC (Chaplain) |
| on Aug 22, 2005 at 05:45 UTC ( #485615=note: print w/ replies, xml ) | Need Help?? |
|
Here is a script which will tell you what you want. The script opens a Pdf and then extracts each page objects MediaBox information in the order it is stored in the pdf. The actual page order is determined by the the order of the Kids entries for the Pages and is left as an exercise for you.
The R:0 is the page view rotation ( a multiple of 90 ). The pages dimensions are defined in points so a portrait definition would have the following entry /MediaBox 0 0 612 792 I hope this is not overkill for you. I know a bit too much about this because I have written a Pdf module which I have not yet released to CPAN... Hope it helps, JamesNC
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||