Skip to content
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

Text redaction annotation support #234

Closed
pcorless opened this issue Nov 28, 2022 · 3 comments
Closed

Text redaction annotation support #234

pcorless opened this issue Nov 28, 2022 · 3 comments
Labels
Core Core rendering mdodule enhancement New feature or request Viewer Viewer Module

Comments

@pcorless
Copy link
Owner

Text redaction annotation support would allow a user to select the respective annotation tool, highlight some text as one would do with the regular highlight annotation tool. But in this case the selection colour would be black and it would be opaque. A user could work their way though the document redacting as needed. The user would then likely need to take advantage of an export redacted document. The dialog would need a few options like encryption or signing options and the ultimately a save/burn button. The save would take advantage of the GH-233 and over write any existing objects with new content.

The redaction text annotation type would take care of the content stream marking and removal of content. There are a couple ways this can be done. The simplest way would probably be to remove the text, and the pre and post text locations updated. A highlight annotation would be drawn as an overlay that would give the black marker effect based on the removed text bounds.

Rewriting the content stream might be as simple as checking if each StringObject intersects the annotation bounds. Individual rules could then be written on how to split the content stream and carry the horizontal displacement to avoid any changes to page layout.

Dependent on GH-233

@pcorless pcorless added enhancement New feature or request Viewer Viewer Module Core Core rendering mdodule labels Nov 28, 2022
pcorless pushed a commit that referenced this issue Sep 12, 2023
pcorless pushed a commit that referenced this issue Sep 15, 2023
pcorless pushed a commit that referenced this issue Sep 19, 2023
pcorless pushed a commit that referenced this issue Sep 25, 2023
pcorless pushed a commit that referenced this issue Oct 5, 2023
pcorless pushed a commit that referenced this issue Oct 9, 2023
pcorless pushed a commit that referenced this issue Oct 14, 2023
pcorless pushed a commit that referenced this issue Oct 16, 2023
pcorless pushed a commit that referenced this issue Oct 16, 2023
…to correct the offset, as nothing was changed layout wise.
pcorless pushed a commit that referenced this issue Oct 18, 2023
…otation bounds when marking what's redacted.
pcorless pushed a commit that referenced this issue Oct 19, 2023
pcorless pushed a commit that referenced this issue Oct 19, 2023
pcorless pushed a commit that referenced this issue Oct 20, 2023
…re added correctly so multiple line contains calls work as expected.
pcorless pushed a commit that referenced this issue Oct 22, 2023
pcorless pushed a commit that referenced this issue Oct 24, 2023
pcorless pushed a commit that referenced this issue Oct 24, 2023
pcorless pushed a commit that referenced this issue Oct 26, 2023
pcorless pushed a commit that referenced this issue Oct 30, 2023
…ions for search hits. Document still needs to be exported to remove the content marked by the redaction annotation.
pcorless pushed a commit that referenced this issue Nov 7, 2023
@gtache
Copy link
Contributor

gtache commented Nov 21, 2023

After a first test, everything seems to work well, thanks a lot!
Our only proposition for now would be to directly propose to the user to export the document instead of saving it in the popup, instead of telling them to go to file->export manually.
I guess the user could choose between yes/no/cancel in this case (yes -> export, no -> save, cancel -> do nothing)

@pcorless
Copy link
Owner Author

Good to hear and good point. I'll make the change the dialog.

@pcorless
Copy link
Owner Author

Merged changes into the GH-314. Fill add future refinements and bug fixes to this new ticket which has both text and image redaction support merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Core rendering mdodule enhancement New feature or request Viewer Viewer Module
Projects
None yet
Development

No branches or pull requests

2 participants