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
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
This returns still 4 drawings …
PyMuPDF version
1.27.1
Operating system
Linux
Python version
3.14