View Single Post
Old 02-07-2010, 05:59 PM   #4
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
Unfortunately, I only have both Windows and calibre installed on my office computer, which I won't have access to until Tuesday. (Just linux at home!) However, I believe the process would be something like the following.

After installing calibre, paste the following into Notepad

Code:
for %%I in (*.pdf) do "C:\Program Files (x86)\Calibre2\pdfmanipulate.exe" crop -o "%%~nI-cropped.pdf" -x 100 -y 100 -w 100 -v 100  "%%I"
You'll probably want to make changes to this. First double check that the path to pdfmanipulate.exe is right, and that the case is right. If you're running 32 bit Win 7 rather than 64 bit, you might need to eliminate the (x86) part. Also, the numbers

-x 100 -y 100 -v 100 -w 100

indicate how many pixels to crop from the left, bottom, right and top, respectively. (I hope that's right... it might not be.) Change from 100 to whatever it needs to be. (Unfortunately I don't know the conversion from pixels to cm or inches offhand.) You might need to run it to test it a few times to get it right.

Save the file as something ending in .bat that you'll remember (batchcrop.bat or similar) in the folder where you have the PDFs you want to crop. Navigate to that folder in Windows Explorer or My Computer and double click the batch file. It'll then create cropped versions of all the PDFs in that folder. The new versions will be named filename-cropped.pdf and so on. (You can change that by editing what I have after -o above.)

That's my best guess at the moment. If I get a chance on Tuesday, I'll double check this, or maybe someone else who has access to both Windows and calibre can help.

Or you could ask in the calibre forum.

Last edited by frabjous; 02-07-2010 at 06:02 PM.
frabjous is offline   Reply With Quote