View Single Post
Old 03-19-2010, 12:30 AM   #6
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
I haven't tried pdf-crop.py, but you can do something similar to pdf-crop.py using the pdfmanipulate command line program that comes with calibre. The command is this:

pdfmanipulate crop -o "Myfile-cropped.pdf" -x 72 -y 72 -w 72 -v 72 "Myfile.pdf"

Where the filename following -o is what the file will be saved as, the filename at the end is the input file name, and the -x, -y, -w and -v are the number of pixels you want to crop from the left, bottom, right and top, respectively. (I hope that's right... it might not be, I haven't checked.)

Typically, there are 72 pixels per inch.

In windows you may need to put in the full path to pdfmanipulate, i.e.:

32 bit Windows:
Quote:
"C:\Program Files\Calibre2\pdfmanipulate.exe" crop -o "Myfile-cropped.pdf" -x 72 -y 72 -w 72 -v 72 "Myfile.pdf"
64 bit Windows:
Quote:
"C:\Program Files (x86)\Calibre2\pdfmanipulate.exe" crop -o "Myfile-cropped.pdf" -x 72 -y 72 -w 72 -v 72 "Myfile.pdf"
I posted more detailed instructions in this thread for using this for cropping all the PDFs in a folder at once with a batch file for Windows and Linux.

I gave instructions both for manually setting the dimensions to crop, and for using Ghostscript to auto-calculate the amount to crop (though that wouldn't work so well for scanned PDFs unless they're exceptionally clean).

You could also try PaperCrop and PDFLRF, which work well more or less automatically with scanned documents. (For the latter, you could use calibre to convert lrf to epub or whatever afterwards.)

Do not use Acrobat for this. Acrobat does not actually crop files. It just pretends to. I.e., it inserts a command to tell its viewer and Adobe Reader to ignore parts of the margins. But these commands are often ignored by reader software, which may well be true of the Nook.

Last edited by frabjous; 03-19-2010 at 12:36 AM.
frabjous is offline   Reply With Quote