If a pdf file is very old, using acroread, convert(print)  it to a ps file that can be opened with the emacs. For example, it is called "output.ps"

gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite --dCompatibilityLevel=1.3 sOutputFile=out.pdf  -c "[/CropBox [60 70 550 738] /PAGES pdfmark " -f output.ps

The letter size is   Pts (H 792 W 612) and  I want to crop left 60, right 62, top 54, bottom 70 pts.  So the CropBox option is

/CropBox [a b c d]

a = 60
b = 70
c = 612-62 = 550
d = 792-54 = 738


* References
http://www.prepressure.com/library/paper-sizes
http://stackoverflow.com/questions/6183479/cropping-a-pdf-using-ghostscript-9-01

* Note that unfortunately,  the Amazon kindle opens this modified pdf extremely slow.

'Computer > linux' 카테고리의 다른 글

create a thumbnail by command line  (0) 2011.09.27
Crop a pdf file to reduce a page margin in Linux  (0) 2011.06.23
email forward by using .forward  (0) 2011.06.05
Convert DOS to unix in emacs  (0) 2011.05.03
posted by citadel