censor/Censor
1
37
Fork
You've already forked Censor
3

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

Open
opened 2026年03月12日 14:38:59 +01:00 by mahlzahn · 0 comments

Description

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

With attached sample pdf file, 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 ...

Originally, this was found on page 20 (i = 23) of https://github.com/py-pdf/sample-files/tree/main/009-pdflatex-geotopo.

Reported upstream issue

https://github.com/pymupdf/PyMuPDF/issues/4936
https://bugs.ghostscript.com/show_bug.cgi?id=709237

Impact

It seems to be a not so rare issue, it was found in 27 of approximately 1,000 PDF document samples, see #110.

## Description 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 With attached sample pdf file, do ```py 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 ... Originally, this was found on page 20 ($i = 23$) of https://github.com/py-pdf/sample-files/tree/main/009-pdflatex-geotopo. ## Reported upstream issue https://github.com/pymupdf/PyMuPDF/issues/4936 https://bugs.ghostscript.com/show_bug.cgi?id=709237 ## Impact It seems to be a not so rare issue, it was found in 27 of approximately 1,000 PDF document samples, see #110.
Sign in to join this conversation.
No Branch/Tag specified
main
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
censor/Censor#134
Reference in a new issue
censor/Censor
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?