how to know user edited the document manually.

Product: @pdftron/webviewer

Product Version:^11.7.1

How can we track whether a user has made any changes to a document loaded in the viewer? If the document is edited manually by the user, I need to save those changes.

In this case, the document may already have been edited previously, or I might add annotations programmatically. These should not be considered manual updates. I only want to detect and save changes when the user has directly modified the document.

Hello Lokesh,

Thank you for contacting WebViewer Forums.

There are several ways to keep track of document changes depending on your use-case. Below are a few examples and documentation links that go into more detail

  1. Importing/exporting XFDF annotation data: Import & Export Annotations with JavaScript | Apryse documentation
  2. Event listener annotationChanged: Annotation Events in JavaScript PDF Viewer | Apryse documentation

Regards,
Luke