You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to remove all texts and only keep vector graphics (such as straight lines) in PDF, the code and result are shown below.
However, the original PDF does not contain that black rectangle, the output is undesired. What should I do? (the PDF file is non-public, but it can be provided though private channels.)
Both 1.24.3 and 1.24.7 have this error.
How to reproduce the bug
doc = fitz.open(pdf_path)
for page in doc:
page.add_redact_annot(page.rect + (-600, -600, 600, 600))
page.apply_redactions(graphics=0)
The result of 1st page is
PyMuPDF version
1.24.7
Operating system
Linux
Python version
3.10
The text was updated successfully, but these errors were encountered:
Thanks - file received.
This is a problem in the base library for which a fix has been developed.
I tested it locally with the improvements and confirmed that it works.
The fix works with MuPDF v1.25.0. (the development version on GitHub).
hi @JorjMcKie, I have tried the new versions (1.24.10 & 1.24.11).
In 1.24.10, the issue is completely solved; however in 1.24.11, the above code has no impact at all (cannot clear the text in the PDF).
Description of the bug
I want to remove all texts and only keep vector graphics (such as straight lines) in PDF, the code and result are shown below.
However, the original PDF does not contain that black rectangle, the output is undesired. What should I do? (the PDF file is non-public, but it can be provided though private channels.)
Both 1.24.3 and 1.24.7 have this error.
How to reproduce the bug
The result of 1st page is
PyMuPDF version
1.24.7
Operating system
Linux
Python version
3.10
The text was updated successfully, but these errors were encountered: