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

Support rewriting document contents on save changes #233

Closed
pcorless opened this issue Nov 28, 2022 · 1 comment
Closed

Support rewriting document contents on save changes #233

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

Comments

@pcorless
Copy link
Owner

The library has supported incremental updates since annotation support was added. Incremental updates is an important feature in PDF for tracking changes and allowing for quick efficient updates. However as precursor to support redaction annotations a new API needs to be created to allow the rewriting of any object in the document that has changed. In the case of redaction's and potentially other publishing cases it is not desirable to use increment updates as the original data would still be available in the PDF file stream.

This ticket will just cover the creation of an API and accompanying data structures to support updated changed objects in PDF file and rewriting the file in it's entirety.

  • append the Document API saveToOutputStream() to have a new parameter to specify either incremental update or update.
  • the existing state manager can be leveraged to grab the update objects that need to be written.
  • handle compressed object stream
  • device a scheme to update or rewrite xref streams and tables with the new object offset.
  • encrypted document will needs some specially handling. I can't remember if the keys are symmetric. If they are, then great this should be relatively straight forward. Similarly more research is needed to consider the different encryption standards available.
@pcorless pcorless added enhancement New feature or request Viewer Viewer Module Core Core rendering mdodule labels May 14, 2023
pcorless pushed a commit that referenced this issue May 24, 2023
pcorless pushed a commit that referenced this issue Jun 8, 2023
…will try iterating over cross reference root next.
pcorless pushed a commit that referenced this issue Jul 12, 2023
 start on annotation deletion modifier
pcorless pushed a commit that referenced this issue Jul 20, 2023
pcorless pushed a commit that referenced this issue Jul 23, 2023
pcorless added a commit that referenced this issue Jul 23, 2023
@pcorless
Copy link
Owner Author

Marking as closed. Will update ass needed if redaction related changes are needed.

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

1 participant