Hello,
I bought the PDF of a book that is now long out of print.
I'd like to run an application that can…
1. Crop all pages to remove empty spaces around each page
2. Remove the license string that was added to some pages.
Is there a free/open-source (qpdf, cpdf, mutool, etc.) application that could automate the process?
Thank you.
--
Edit: Tried this as an experiment, but it's not cropped
Code:
strings input.pdf | grep "Box"
/CropBox [0.0 0.0 285.36 436.8]
/MediaBox [0.0 0.0 285.36 436.8]
etc.
NOCHANGE gs -sDEVICE=pdfwrite -sOutputFile=output.pdf-dBATCH -dNOPAUSE -c "<</ColorImageFilter /FlateEncode>> setdistillerparams" -f input.pdf -c "[ /CropBox [ 0 0 250 400] /PAGES pdfmark" -f
LibreOffice won't do because the output is a bit messed up (the OCR text in another layer shows on the side while it's hidden in the original.) From experience, LO Draw isn't very good at editing PDFs.