I built a small shell script using some latex tools for the purpose of reformatting certain irregular PDF documents.
I was wondering if there was any technique that has been developed to automatically crop a pdf image to its visible text. Essentially, I have a number of pages that have visible text with a large amount of white space around them. The amount of existing white space varies, so I was hoping that there was some way to script the cropping dimensions to automatically trim the white space up to the smallest possible rectangle.
Has anyone done this or seen it done? If not would anyone have any suggestions on the best way to script this?
Graphics, Figures & Tables ⇒ Automatically crop PDF to visible text
NEW: TikZ book now 40% off at Amazon.com for a short time.

Automatically crop PDF to visible text
Here are two suggestions:
You may also be able to accomplish what you want with the preview package, but it's unclear from your description.
- The pdfcrop perl script, which is on CTAN, and quite possibly already installed as part of your LaTeX installation.
- Another script making use of a combination of Ghostscript and calibre. Details here.
You may also be able to accomplish what you want with the preview package, but it's unclear from your description.