I was interested in pdfcrop because that happens often to scan a book which is less than A4 or letter, so that on each page, there's part of the page next to it on the book. So pdfcrop doesn't recognize it as white margins... In the doc you say "There are also options to set the page size and desired white margins (as a percentage)." but I just cannot find the way to do it. It looks like the margins option is more to add margins than remove them (plus that gives me an error: Invalid margin size. Margin size must be an integer whereas I typed pdfcrop -margins 10 input.pdf output.pdf).
So I don't know if there's an option to manually specify which margins should be removed? That would be really useful. But no matter what, pdfcrop is a great tool, thanks for doing it :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The new version of PDFCrop assumes 5 percent white margins, but I will allow users to set their own white margins in the next release.
In your specific case however, the image of the text on adjacent page would still be captured in the PDF's Mediabox, so you would have to find another way to remove the unwanted portions of the image.
For example, you could convert the PDF pages to image files (with pdftk) and then crop the images (with convert from imagemagick). Both of those programs are command line tools, so you could script the process.
Good luck,
- Eric
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I was interested in pdfcrop because that happens often to scan a book which is less than A4 or letter, so that on each page, there's part of the page next to it on the book. So pdfcrop doesn't recognize it as white margins... In the doc you say "There are also options to set the page size and desired white margins (as a percentage)." but I just cannot find the way to do it. It looks like the margins option is more to add margins than remove them (plus that gives me an error: Invalid margin size. Margin size must be an integer whereas I typed pdfcrop -margins 10 input.pdf output.pdf).
So I don't know if there's an option to manually specify which margins should be removed? That would be really useful. But no matter what, pdfcrop is a great tool, thanks for doing it :)
Well, in case someone has the same problem, I found the tool to do it here:
http://konrad.familie-kieling.de/computer/34-linux/63-crop-pdfs
Hope it helps!
The new version of PDFCrop assumes 5 percent white margins, but I will allow users to set their own white margins in the next release.
In your specific case however, the image of the text on adjacent page would still be captured in the PDF's Mediabox, so you would have to find another way to remove the unwanted portions of the image.
For example, you could convert the PDF pages to image files (with pdftk) and then crop the images (with convert from imagemagick). Both of those programs are command line tools, so you could script the process.
Good luck,
- Eric