-
Notifications
You must be signed in to change notification settings - Fork 427
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
Page.apply_redactions() removes more text than expected in the pdf document. #3433
Comments
Please provide all mandatory information - in this case, the reproducing file is missing. |
I'm sorry for that. These are the files: |
Thanks for the examples. for r in page.search_for("david meyer"):
page.add_redact_annot(r)
'Redact' annotation on page 0 of original.pdf
page.apply_redactions(0,0,0)
True
doc.ez_save("x-1.24.2.pdf") In the meantime, I also redacted other parts of the page (the text |
HI @JorjMcKie I have faced the same issue while applying Redaction. they remove images which should not be removed or changing text. I have attached both pdf to reproduce the issue Code:-
PyMuPDF version Operating system Python version |
@aleem75321 please submit this as a different issue - this is too confusing in this context. |
I have summited different issues please see the below link. Facing Issues after applying redactions they delete some Images or Icons #3439 |
I reduced the application to the bare minimum. I still encounter the same issue. I tried it on mac M3 and on ubuntu linux (Intel) as well as in a docker container with import fitz
doc = fitz.open("./original.pdf")
for page in doc:
for r in page.search_for("David Meyer"):
page.add_redact_annot(r)
page.apply_redactions(0, 0)
doc.ez_save("redacted.pdf") With the following files: I don't know what to try now... If you have another good idea, please let me know... |
@dameyerdave we (a colleague of mine and I) have tried on all 3 platforms now Mac, Linux, Win with |
My only advice is to re-install 1.24.2. |
No such luck: |
@luchux - "A picture is worth a thousand words." Certainly true. But a thousand pictures are not worth a million words! Please also note, that the problem of this post is yet not reproducible and thus unclear whether it is a bug at all. |
Description of the bug
As soon as I apply the reductions all the text and graphics get lost from the pdf.
Source:
Annotated:
After
apply_reductions()
:How to reproduce the bug
This is the code I wrote to come tho this:
PyMuPDF version
1.24.2
Operating system
MacOS
Python version
3.10
The text was updated successfully, but these errors were encountered: