Do you have an issue with a specific file(s)?
Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server?
Does the issue only happen on certain browsers?
Is your issue related to a front-end framework?
Is your issue related to annotations?
Please give a brief summary of your issue:
(Think of this as an email subject)
Storing PDF Edits
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Was wondering if you guys have best practices for storing PDF edits in SQL and rendering them on a page on load. My current idea was to store, original and changed text, but this doesnt account for font, highlight changes etc. On the BE was thinking of using content replacer to edit the text stream of the file originally stored in S3. Wondering if you guys have a full stack best practice. We use React FE and Python Fast API BE
Please provide a link to a minimal sample where the issue is reproducible:
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
Storing PDF edits efficiently involves capturing all changes, including text, annotations, and formatting. Using Apryse’s WebViewer, you can handle this through XFDF files for annotations and content replacement for text changes. Storing the original and edited content alone might not suffice for comprehensive changes like formatting or annotations.
Some things you can try:
Use Apryse’s XFDF format to store annotations separately. This can capture highlights, notes, and other annotation data.
For text changes, consider using the ContentReplacer API to apply text updates directly to the PDF content stream.
Store the original PDF in S3 and maintain a separate database record for each edit operation, linking them through identifiers.
On the backend, process the stored changes using Python and apply them to the PDF when it is loaded.
On the frontend, use React to fetch and render the PDF along with its stored edits using the WebViewer API.
Here are some resources that might help you:
Annotations Guide: Learn how to use XFDF to handle annotations efficiently.
Are you changing the text of the PDF through content replacer and wanting to store the text? A description in your use case would help us provide a answer.
Yes I want to essentially store PDF edits whether that be actual text changes, or stylistic changes(font, font style etc, box resizing) Struggling to think of a extendable SQL schema to store all the possible edits a user can make. So was just wondering if there was an example or SOP for how to store these edits. Storing annotations was easy with XFDF data, but I don’t want to render those annotations over the text on doc load just have the pdf be edited
For Annotations I stored some metadata , the apryse annotation id, and the xfdf data. I want to know how/ or should I design a table to store edits and be able to either load them server side or apply them on client side