How to delete an annotation when annotation has a different author than the current user

49 views
Skip to first unread message

Matt Parizeau

unread,
Nov 9, 2016, 3:07:02 PM11/9/16
to PDFTron WebViewer
Q:

While deleting the annotations using annotationManager.deleteAnnotation(annotation) method, I'm getting an error "You do not have permissions to delete this annotation". Is there a way I can delete this annotation anyway?

A:

The reason this is happening is that by default WebViewer checks if you have permission by comparing the current user name (defaults to Guest) with the author of the annotation. You can override this when calling deleteAnnotation by passing true for the "force" parameter to force the deletion regardless of the actual permission. See here for the documentation on the parameters: http://www.pdftron.com/webviewer/demo/lib/html5/doc/symbols/CoreControls.AnnotationManager.html#deleteAnnotation

So you would call it like this: annotManager.deleteAnnotation(myAnnot, false, true);
Reply all
Reply to author
Forward
0 new messages