Welcome to the Monastery | |
PerlMonks |
PDF::API2 Page Dimensions Layoutby dimv (Novice) |
on Aug 16, 2010 at 00:48 UTC ( [id://855178]=perlquestion: print w/replies, xml ) | Need Help?? |
dimv has asked for the wisdom of the Perl Monks concerning the following question: The project: Convert letter-sized PDFs to legal, add the job identifier and folio to the bottom left. Of course my first thought was - a quick 5 minute perl script! Loaded up PDF::API2, read the docs, and got to coding. Below is the snippet we are concerned about:
The problem: When we change the page dimensions to Legal, all the "space" is added at the top where as we want all the space to be at the bottom. This is to be expected, since I'm guessing it is just adding more to the pages x,y, and 0,0 being the bottom left. Meaning a larger page dimension would increase the page from the top-right and out. How would one go about tackling this issue? I cannot change the existing pdf before it gets to me, though. Is there some function I'm missing to offset the current contents by the difference of letter and legal (increasing their 'y' so they all move up the page), or do I should I parse the PDF and completely rebuild it? Thank you for any considerations, or opinions I should take to remedy this.
Back to
Seekers of Perl Wisdom
|
|