Skip to content

Commit

Permalink
updating the name
Browse files Browse the repository at this point in the history
  • Loading branch information
vinissou committed Oct 12, 2024
1 parent 2f12f4c commit c101f27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
[![ruff](https://github.com/vinissou/PdfPageSizeFixer/actions/workflows/ruff.yml/badge.svg)](https://github.com/vinissou/PdfPageSizeFixer/actions/workflows/ruff.yml)

# PDF-PageSizeFixer
# PDF-PaperSizeFixer


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.
A quick solution to change PDF files page size, because Ghostscript and every single option I ever tested always messes with the orientation, sometimes in a destructive way.
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.



## Future Features

- Add an option to resize the images in order to keep a fixed DPI value.
- Auto select the closest paper size from a standard
- Add outdated paper sizes


## 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:
https://github.com/pymupdf/PyMuPDF/discussions/3348
Expand Down
2 changes: 1 addition & 1 deletion pdf_page_size_fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def parsing_args():
parser = argparse.ArgumentParser(
prog="PDF-PageSizeFixer",
prog="PDF-PaperSizeFixer",
description="Adjusts a PDF's print paper size",
epilog=messages.help_text,
)
Expand Down

0 comments on commit c101f27

Please sign in to comment.