Skip to content

bug: incomplete redaction of vector graphics (line art) #4936

@mahlzahn

Description

@mahlzahn

Description of the bug

Although the “drawings” in the sample PDF attached, are not visible, they may in the worst case contain sensible information and should probably be removed, too, when applying redactions.

How to reproduce the bug

With attached incomplete_redaction_sample.pdf, do

from pymupdf import *
dx = Document("incomplete_redaction_sample.pdf")
dx[0].add_redact_annot(Rect(FZ_MIN_INF_RECT, FZ_MIN_INF_RECT, FZ_MAX_INF_RECT, FZ_MAX_INF_RECT), fill=False)
dx[0].apply_redactions(graphics=2)
dx[0].get_drawings()

This returns still 4 drawings …

PyMuPDF version

1.27.1

Operating system

Linux

Python version

3.14

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream bugbug outside this package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions