#4944·PyMuPDF

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

  1. Get sample from: https://github.com/ArtifexSoftware/tests/blob/master/pdf/cff_reuses_private_dict.pdf
  2. Run following python code snippet:
    python
    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()))
  3. See output:
    python
    'p\np\n'

PyMuPDF version

1.27.1

Operating system

Linux

Python version

3.14