Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vinissou committed Oct 3, 2024
1 parent 4ff5ade commit bfed83e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ This just adjusts the MediaBox value of the file without re-encoding the images
I intend to expand it's funcionality and add executables soon.


It can only save PDFs in the 1.7 version, it doesn't seem to have a way to change this in PyMuPDF:
## 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

And they do not support PDF/A either:
https://github.com/pymupdf/PyMuPDF/discussions/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 safe.
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.
4 changes: 2 additions & 2 deletions pdf_page_size_fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
rotation = page.rotation
page.set_rotation(0)

page_y = paper_size("A4")["y"] # this wil be a dedicated
page_x = paper_size("A4")["x"] # function
page_x = paper_size("A4")["x"] # this wil be a dedicated
page_y = paper_size("A4")["y"] # function
pageH = imglist[2]
pageW = imglist[3]
mediaH = page.mediabox[2]
Expand Down

0 comments on commit bfed83e

Please sign in to comment.