Skip to content

Add sanitize mode for stripping invisible text#77

Open
jsonn wants to merge 1 commit intoArtifexSoftware:masterfrom
jsonn:remove_invisible_text
Open

Add sanitize mode for stripping invisible text#77
jsonn wants to merge 1 commit intoArtifexSoftware:masterfrom
jsonn:remove_invisible_text

Conversation

@jsonn
Copy link
Contributor

@jsonn jsonn commented Aug 12, 2025

OCR processes typically produce text objects with text render mode 3, so this option allows stripping OCR layers for recreating them. This can also simplify documents for print processing without visual impact.

@jsonn
Copy link
Contributor Author

jsonn commented Aug 12, 2025

One remaining issue is that if all the references to a font are from invisible text, it is still referenced in the page's font dictionary. This issue is shared with the redaction logic. A second sanitize run fixes that issue.

@jsonn
Copy link
Contributor Author

jsonn commented Aug 14, 2025

#78 solves the mentioned issue.

This creates a full page redaction annotation and runs the redaction
engine to ensure that no invisible text remains.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant