Closed dennevi closed 1 year ago
Thanks for the bug report. I'm getting the same errors. I pushed out version 1.1.9 of pdfCropMargins which requires PyPDF2 < 3.0.0 in setup.py
. They've been making a lot of changes to that project recently, including a planned renaming to pypdf
.
Thank you for releasing a quick workaround! And thank you for a great tool! Just found it a few days ago, it will come in handy.
The new version 2.0.0 is now out. It removes the PyPDF dependency altogether and PyMuPDF is used for all internal calculations.
When I installed pdfCropMargins a few days ago, it installed PyPDF2 3.0.0 for me.
The "-p" argument does absolutely nothing when using PyPDF2 3.0.0. I've tried to figure out why it doesn't work, but I cannot figure it out. One strange thing is that "-ap" argument still works with 3.0.0. I.e. "pdfCropMargins -ap 100 -p 0 document1.pdf" crops 100 pixels from each side of the document, but leaves a lot of white space around the small object that is in the middle of the document I'm using for testing.
When using "-v", it looks like the cropbox is calculated correctly, it just isn't applied to the pdf.
I tried downgrading PyPDF2 to 2.12.1, it works correctly.
I got these versions:
Downgrading solves the issue: