IsAdded value changed after calling saveAnnotation()

29 views
Skip to first unread message

Jessie Lin

unread,
Dec 12, 2016, 1:14:54 PM12/12/16
to pdfnet-w...@googlegroups.com
Hi,

I am using Annotation's IsAdded property in setPermissionCheckCallback to determine if an annotation is changeable. However After calling saveAnnotation(), I found all IsAdded property in Annotation Manager's annotationList always become false. I tried to delete exists annotations then add new annotations which has  IsAdded property as before saving. As the result, setPermissionCheckCallback still gets IsAdded as false for those added annotations. 

I would like know  how to prevent IsAdded being changed after saveAnnotation()? Or, any suggested solution to assign the value to  IsAdded property while calling addAnonotation() or addAnonotations()?  

Thanks,
Jessie


Matt Parizeau

unread,
Dec 14, 2016, 1:35:00 PM12/14/16
to PDFTron WebViewer
Hi Jessie,

The IsAdded property is used by AnnotationManager's getAnnotCommand function to determine if an annotation is newly added and should show up in the command. After getAnnotCommand it's expected that all the IsAdded properties of annotations are set to false. Does your saveAnnotation function call getAnnotCommand?

What behavior are you trying to have for your annotation permission checking? Depending on what you're trying to do it might be better to use something else besides the IsAdded property.

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages