Copy link to clipboard
Copied
Hi, I am using PDF Embed API for the web application wanted to get control of the Delete Action of the Annotation.
Why I would need this is listed below:
Imagine I am logged in as a User called "Amit" and added some annotation, this annotated value is stored in my local collection and logged out of the application.
The user called "Akash" logged in and see that the annotation is added to the PDF and he try to delete the annotation what "Amit" has added using the Delete Option in the Drop Down.
I wanted to have control over the Delete Action before the Annotation is actually deleted.
I am listening to the Event Listener as
Copy link to clipboard
Copied
I have an example at this CodePen that shows how to immediately deselect an annotation that was selected by someone other than the author. If it can't be selected, it can't be deleted.
Copy link to clipboard
Copied
Hi Joel,
Thanks for the reply.
The above-mentioned example will not allow me to complete my workflow ie, to reply to the comment.
When a user comments, the other user will also reply to the comment added by the previous user.
That's why I would need control on how to handle the EDIT and DELETE Options from UI.
Copy link to clipboard
Copied
In that case. My suggestion would be to listen for "ANNOTATION_SELECTED" and if the author isn't the user, pop up a dialog where they can capture the reply text (or cancel) and then programmatically add the reply.
I've already submitted a feature request to "lock" annotations from other users but haven't heard an update on the request.
Copy link to clipboard
Copied
Thanks Joel,
So Adobe does not give any control on the EDIT and DELETE Option is it ?
Copy link to clipboard
Copied
Unfortunately, at this time, the commenting API and even the comment schema do not natively allow for annotation locking or limit a set of annotations from being modified. Currently, all actions are available for all annotations regardless of author. The best you can do at this time is to detect any changes and take the appropriate action.
Copy link to clipboard
Copied
Hello, I'm curious how you were able to excute
annotationManager.addAnnotations([json]);
without having the pdf show "Edited" on the header, like this?