-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZeroDivisionError: float division by zero when use apply_redactions() #2943
Comments
Cannot reproduce: >py -3.10 test.py
PyMuPDF 1.23.8: Python bindings for the MuPDF 1.23.7 library.
Version date: 2023-12-19 00:00:01.
Built for Python 3.10 on win32 (64-bit).
span: bbox= [272.4049987792969, 309.27484130859375, 447.60748291015625, 343.45452880859375] text= Frank Demmler BTW: any particular reason why you would use the JSON output instead of the original "dict"? |
Further investigation revealed that there is an error in the rebased implementation only, which in turn only occurs if the rectangle in |
it works when change code to page.add_redact_annot(fitz.Rect(span["bbox"]), ...). |
Thanks for your feedback and I am glad it works for you! |
This is fixed in release candidate 1.23.9rc1; see: #2960 |
Fixed in 1.23.9. |
Description of the bug
How to reproduce the bug
first put the file Equity Compensation Master.pdf Equity Compensation Master.pdf
to data/input/Equity Compensation Master.pdf
then run the code:
PyMuPDF version
Built from source
Operating system
Windows
Python version
3.10
The text was updated successfully, but these errors were encountered: