View Single Post
Old 12-08-2021, 08:02 AM   #1
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 207
Karma: 304158
Join Date: Jan 2016
Location: France
Device: none
Question Crop all pages, and remove footnote added in some?

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.

Last edited by Shohreh; 12-08-2021 at 10:34 AM.
Shohreh is offline   Reply With Quote