I am currently using PDFcrop to trim away unwanted margins of a multipage PDF file generated by my laptop's Print to PDF facility.
The problem is, PDFcrop is -very- slow. For a 15 page document, it takes me 17 minutes to process using the following syntax.
pdfcrop --margins "-1 0 -1 -2" Raw.pdf Cropped.pdf &> /dev/null
Needless to say this is unacceptable in light of the fact that I will be doing a similar procedure on PDF files generated in the exact same fashion that will be in excess of 150 pages long. I do not relish the thought of leaving my computer running and unattended overnight.
I have given thought to using PDFjam to crop pages instead, but it does not work as expected. I used the following command, and it unsuccessfully cropped a single page from my PDF.
pdfjam --keepinfo --trim "54 82 60 54" --clip true --suffix "cropped" page1.pdf
As illustrated in the above command, the unwanted 'margin' around each page is 54px on the left and top margins, 60px on the right margin, and 82 px on the bottom margin. If expressed as mm instead, these would equate to 19mm 28.9mm 21.2mm 19mm.
Is there a way to get PDFcrop to not attempt to calculate the unwanted white space (to which my adjustments refine to the wanted cropping effect), as the margins to be deleted in each page is identical? Or a way to get PDFjam to appropriately crop the margins without cropping the content (my exercises in this regard result in certain margins that are unremovable)?
I am not able to decompress and compress the PDF in question to edit it in a text editor, as doing so locks up my computer (and manually editing multiple pages is a pain in any case, even if my computer didn't lock up in response to loading even an uncompressed PDF file as a text file), so manually editing the margins is not possible for me.
Note: Asked in Stack Overflow and was told to ask here as well. Original post (a copy of this) can be found at the following link - https://stackoverflow.com/questions/34935258/quicker-alternative-to-pdfcrop
- Operating System: Linux (XUbuntu 13.10)
- Budget: Zero (Using free applications, hence pdfcrop and pdfjam and nothing using official adobe)
- Featureset: Command-line usage as I'm using the command in question within the framework of a bash script to put together and optimize the multipage PDF.