Skip to content

A quick solution to change a PDF file page size, while keeping the images and text intact.

License

Notifications You must be signed in to change notification settings

vinissou/PDF-PageSizeFixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruff

PDF-PageSizeFixer

A quick solution to change PDF files page size, because Ghostscript and every single option I tested at the time just messed with the orientation. This just adjusts the MediaBox value of the file without re-encoding the images to avoid any quality loss. And it also keeps the OCR intact.

I intend to expand it's funcionality and add executables soon.

Limitations

For now, it can only save PDFs in the 1.7 version, it doesn't seem to have a way to change this in PyMuPDF: pymupdf/PyMuPDF#3348

And they do not support PDF/A either: pymupdf/PyMuPDF#2169

I used to run MuPDF with the "mutool clean" command after running this command to ensure the PDF/A conformity would not get lost. Mutool can't convert PDFs to PDF/A, but the clean command usually helps to keep a file already formatted as PDF/A as such.

About

A quick solution to change a PDF file page size, while keeping the images and text intact.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages