Skip to content

bug: incomplete redaction of text #4944

@mahlzahn

Description

@mahlzahn

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:
    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:
    'p\np\n'

PyMuPDF version

1.27.1

Operating system

Linux

Python version

3.14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions