bug: incomplete redaction of text
Author: mahlzahnCreated Mar 18, 2026Updated Sep 4, 2026
LabelsHas a test
Description of the bug
Sometimes, text is not properly redacted, in the example below the letter p is not removed.
How to reproduce the bug
- Get sample from: https://github.com/ArtifexSoftware/tests/blob/master/pdf/cff_reuses_private_dict.pdf
- Run following python code snippet:
document = pymupdf.Document("cff_reuses_private_dict.pdf") page = document[0] page.add_redact_annot(page.rect) page.apply_redactions(text=pymupdf.PDF_REDACT_TEXT_REMOVE) print(repr(page.get_text())) - See output:
'p\np\n'
PyMuPDF version
1.27.1
Operating system
Linux
Python version
3.14
Source: pymupdf/PyMuPDF