|
From: Eric D. <er...@do...> - 2011-03-02 21:51:04
|
Hi Michal, Jozef and Martin,
For a very long time, I have wanted a program that would automatically
resize and rescale a PDF page so that it fits on a standard-size sheet
of paper. After many bad hacks and after receiving a lot of help, I have
gotten closer to my dream.
The attached script:
* determines the page orientation
* calculates the optimal page metrics and scale factor and
* resizes and rescales the pages.
For most purposes, this script will do what I need it to do -- fit the
text of an journal article onto a standard size sheet of paper.
But occasionally, I receive a PDF file with enormous white margins. In
such cases, I want to crop the pages down to the bounding box before
resizing and rescaling the page.
So I would like to include the bounding box values in my script. I know
that there is a "getBBox()" function, but I cannot get it to work.
How do I obtain the bounding box values?
Thanks,
- Eric
|