Skip to content
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

Remove text not working in 1.23.25 version vs 1.20.2 #3196

Closed
bilykigor opened this issue Feb 21, 2024 · 7 comments
Closed

Remove text not working in 1.23.25 version vs 1.20.2 #3196

bilykigor opened this issue Feb 21, 2024 · 7 comments
Labels
fix developed release schedule to be determined Fixed in next release upstream bug bug outside this package

Comments

@bilykigor
Copy link

Description of the bug

Text removal from pdf with PyMuPDF

works good in python3.8 and PyMuPDF 1.20.2: Python bindings for the MuPDF 1.20.3 library

Screen Shot 2024-02-21 at 11 12 42 PM

but if used python3.12 and PyMuPDF 1.23.25 - not all text is removed

Screen Shot 2024-02-21 at 11 09 57 PM

How to reproduce the bug

`import fitz
pdf_doc = fitz.open('data/file.pdf')
page = pdf_doc.load_page(0)
for block in page.get_text("words"):
rect = fitz.Rect(block[:4])
page.add_redact_annot(rect)
page.apply_redactions()

pdf_doc.save('data/file_1.pdf')
pdf_doc.close()`

PyMuPDF version

1.23.25

Operating system

MacOS

Python version

3.12

@julian-smith-artifex-com
Copy link
Collaborator

Could you add the input file, data/file.pdf, to this issue page?

@bilykigor
Copy link
Author

Unfortunately not, it is under NDA. Maybe I can share some metadata?

@bilykigor
Copy link
Author

bilykigor commented Feb 23, 2024

The bug starts from PyMuPDF-1.23.9 while in 1.23.8 all good.

@JorjMcKie
Copy link
Collaborator

Sorry, but we need data to reproduce the problem. You can use direct e-mail addresses if there are data protection concerns, or else a file cleaned from confidential data.

@bilykigor
Copy link
Author

is it valid mail?
jorj.x.mckie@outlook.de

@JorjMcKie
Copy link
Collaborator

@bilykigor yes - use it with confidence

@julian-smith-artifex-com
Copy link
Collaborator

Fixed in 1.24.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix developed release schedule to be determined Fixed in next release upstream bug bug outside this package
Projects
None yet
Development

No branches or pull requests

3 participants