PDF batch editing
October 24, 2007 1:10 PM   Subscribe

PDF editing - batch processing on a large number of pages?

I have a really large PDF document (>200 pages) where each page has a wide and colorful border around the main text. I want to print the whole thing for personal reference, but first I'd like to remove the border area from every page since it's rather distracting. Is there a way to do this all at once?

I don't have Photoshop or any Adobeware other than Reader; I may be able to get a copy of Acrobat (which I've never used), but I would prefer to use free and/or less memory-eating software.
posted by casarkos to Media & Arts (7 answers total)
You could probably use Very PDF PDFStamp to "stamp" white blocks over the borders.
posted by exogenous at 1:23 PM on October 24, 2007

If you have the space to do it, then you can generate the pages with ghostscript:

gs -sDEVICE=pnggray -sOutputFile=page%03d.png -r600 -q -dNOPAUSE - <source.pdf

Then you can hit the pages with an ImageMagick crop command (you can do it in place if you use 'mogrify', ask if you want the details) and use IM again to reassemble them into a pdf - but that'll make a doozy of a big pdf if you do that. If you're just printing it, I'd just print the pages (lpr *.png).
posted by Wolfdog at 1:34 PM on October 24, 2007 [1 favorite]

Copy/pasting into a word processor is unacceptable?

The stamp idea is good. I've done that on occasion with Acrobat Pro, though I've never tried it with freeware. You can also try Document > Crop if you can get Pro.

Tried printing beyond your printer margins in Reader? There's a chance that might work, but it's probably the clumsiest way to try and isolate the text.
posted by cowbellemoo at 1:38 PM on October 24, 2007

You should be able to set a custom page size for the same size as your main copy. Then, when printing, you can drag the preview thumbnail around to crop the page
posted by nathan_teske at 1:50 PM on October 24, 2007

Or just email me the PDF and I can crop it for you.
posted by nathan_teske at 1:51 PM on October 24, 2007

Sorry for the late response, PDFill might be of help. It installs a PDF Writer (which isn't very good) and a whole bunch of PDF tools (which are). Just reading off the list, there's merge/split/reorder pages, rotate/crop (what you're looking for), page catenation, watermark, image-to-pdf conversion and vice-versa, and much more. It's freeware as well.

A quick test reveals single/all pages mode, but only manual margin input so be sure to note down the crop margins you need before opening the crop tool.
posted by kureshii at 7:50 PM on October 24, 2007

Oh, you might want to note that I've had slight trouble using some of the tools with very large PDF files (700+ pages), basically some responsiveness issues with a Core Duo + 2GB RAM, but if you're doing this on a desktop/overpowered laptop or only working with small PDF files it shouldn't be a problem.
posted by kureshii at 7:52 PM on October 24, 2007

« Older Panty stealer!   |   I don't care for television, but I want to stay... Newer »
This thread is closed to new comments.