Skip to content

Add sanitize mode for stripping invisible text #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsonn
Copy link

@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.

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
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
Author

jsonn commented Aug 14, 2025

#78 solves the mentioned issue.

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