Thread: Cropping PDFs
View Single Post
Old 08-14-2006, 08:51 AM   #4
harryo
Enthusiast
harryo began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Aug 2006
Device: Palm Tungsten TX / Iliad
Quote:
Originally Posted by ali
I found that all PDF's I tried so far could be cropped manually by editing the MediaBox.

For example, an A4 PDF will contain something like
Code:
/MediaBox [ 0 0 595 842 ]
in one or several places. I just adjusted the four values - to crop 50 points from each border, I'd change that to
Code:
/MediaBox [ 50 50 545 792 ]
Both acroread and xpdf will honor that. That way, you can even crop page numbers / chapter headings and such away.
Fantastic! I'll try whipping up a Ruby script to do this automatically for me.

Thanks for the information.
harryo is offline   Reply With Quote