[pdftex] Cropping bottom margin off one-page documents.
Heiko Oberdiek
oberdiek at uni-freiburg.de
Sun Sep 19 13:07:12 CEST 2004
On Sun, Sep 19, 2004 at 08:38:28AM +0000, 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?
You can edit the pdf file directly and correct the entry for the
/MediaBox, but caution, do not change the number of bytes, otherwise
the xref table will be wrong.
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
--
More information about the pdftex
mailing list