I am using
PDF::Reuse to munge some PDFs. I have the dimensions of the PDFs in question stored in a database, so when I create a new one, I can use the
rMbox function to set the right size. Unfortunately, some of my source PDFs appear to be in landscape mode, so the X and Y coordinates are essentially reversed. However, the coordinates, which come from
pdfinfo, are always in X,Y order regardless of orientation. This results in the munged PDFs being cut off as the content ends up outside the page boundaries.
I also tried using Image::Magick to get the size of each PDF, but the dimensions are reported in the same order as pdfinfo so that's no help. If anyone knows an easy and reliable way to determine the orientation of a PDF (or to simply get the dimensions in the right order in the first place) I would be very grateful.
Thanks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.