You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering to what extent we can know whether an annotation has been deleted from a document? This is of particular interest for me when dealing with documents that I load that already have annotations (i.e. not those that I add while using the viewer).
My original thought was to tap into the annotationEditorEvent, yet what I'm seeing is that that event is triggered for every existing annotation when I enable the highlighter ("added" events) and then when I disable the highlighter ("removed" events). The events will also fire when I add and then remove an individual annotation.
Along with this, I'm trying to understand why, when I "remove" an annotation, it is not removed from the underlying PDF document. That is, await page.getAnnotations()will include the annotation that I just removed.
Ultimately, I'm looking for a way to track annotations that exist in the document when it's loaded and keep track of everything individually that's been added or removed. This allows me to provide a sort of "syncing" feature on the backend by only providing the "current" annotation set. Is this possible today?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wondering to what extent we can know whether an annotation has been deleted from a document? This is of particular interest for me when dealing with documents that I load that already have annotations (i.e. not those that I add while using the viewer).
My original thought was to tap into the
annotationEditorEvent
, yet what I'm seeing is that that event is triggered for every existing annotation when I enable the highlighter ("added" events) and then when I disable the highlighter ("removed" events). The events will also fire when I add and then remove an individual annotation.Along with this, I'm trying to understand why, when I "remove" an annotation, it is not removed from the underlying PDF document. That is,
await page.getAnnotations()
will include the annotation that I just removed.Ultimately, I'm looking for a way to track annotations that exist in the document when it's loaded and keep track of everything individually that's been added or removed. This allows me to provide a sort of "syncing" feature on the backend by only providing the "current" annotation set. Is this possible today?
Beta Was this translation helpful? Give feedback.
All reactions