Repository navigation
Redact PDF: keep the text you didn't cover searchable - #87
Merged
Merged
Conversation
Redacted pages are still saved as images, so nothing under a mark can be recovered. The text outside the marks is now added back as an invisible layer, so the file can be searched, selected and copied. Text is only added back when it shows on the rendered page: runs that touch a mark, sit under an existing black box or are drawn in the page colour are left out. A checkbox turns it off for an image-only file. Part of #85.
# Conflicts: # src/i18n.ts # src/i18n/bn.json # src/i18n/de.json # src/i18n/es.json # src/i18n/fr.json # src/i18n/hi.json # src/i18n/id.json # src/i18n/it.json # src/i18n/mr.json # src/i18n/nl.json # src/i18n/pl.json # src/i18n/pt.json # src/i18n/ta.json # src/i18n/te.json # src/i18n/tr.json # src/i18n/vi.json # tests/app.e2e.ts
Deploying fizzdoc with
|
| Latest commit: |
8b35cf0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://63c43ae9.fizzdoc.pages.dev |
| Branch Preview URL: | https://feat-redact-keep-text.fizzdoc.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #85 (the scrolling half shipped in #86).
Redacted pages are still saved as images with the marks burned in, so nothing under a mark can be recovered. Until now that also meant the rest of the file lost its text. Now the text outside the marks is added back as an invisible layer, the way OCR tools do it, so it can be searched, selected and copied again.
What gets added back. A text run is kept only when:
A run that's only partly covered is dropped as a whole, rather than guessing where letters fall.
Font. The layer uses a glyphless Type0 font with an identity ToUnicode map, so any script (Hindi, Tamil, accented Latin…) is searchable, and nothing is ever drawn with it.
Option. A "Keep the rest of the text searchable" checkbox (on by default) gives an image-only file when unticked. PDF to scanned PDF is unchanged: still no text.
Copy. The hint, the intro and two FAQ answers are updated in all 16 languages.
Tests: