[pdftex] Cropping bottom margin off one-page documents.

Hans Hagen pragma at wxs.nl
Mon Sep 20 09:56:16 CEST 2004


Michael Chapman wrote:

>I have several thousand one-page pdf-documents that I wish to trim the white 
>space off the bottom of.
>Using 'pdfcrop' (and re-creating the top, left and right margins using the 
>"--margins" flag in 'pdfcrop') gives the required layout.
>
>Unfortunately the passage through 'gs' that 'pdfcrop' (I think) uses kills 
>the hyperlinks.
>
>I have thought of using the basis of 'pdfcrop' and measuring the bounding box 
>for each document, and then recreating all the pdf-documents using 'geometry' 
>to set the page lengths file-by-file.
>
>Is there a neater solution?
>  
>
a few line perl script can do that, just replace the media box or crop 
box (as long as you treat the file binary and the size the same)

Hans



More information about the pdftex mailing list