How to set Annotation Flags ?

48 views
Skip to first unread message

Marc Egenrieder

unread,
Mar 20, 2018, 1:05:32 PM3/20/18
to PDFTron WebViewer
In the documentation there are two methods:

'getFlag(string)'
'setFlag(string, boolean)'

but when actually working with annotations in Webviewer version 3.1.0, the functions don't seem to be present:
'.getFlag is not a function'

am I missing something or whats the deal here?

Matt Parizeau

unread,
Mar 21, 2018, 6:06:19 PM3/21/18
to PDFTron WebViewer
It looks like these two functions aren't actually used so we'll remove them for the next release. There are particular annotation properties that you can access to set annotation flags (https://www.pdftron.com/webviewer/demo/lib/html5/doc/symbols/Annotations.Annotation.html#Annotation__anchor)

For example, Hidden, Printable, ReadOnly, etc.

Is there a particular annotation flag that you're looking for?

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Marc Egenrieder

unread,
Mar 22, 2018, 1:51:38 PM3/22/18
to PDFTron WebViewer
I wanted to set a custom Flag, because I wanted to add a new boolean field to annotations that also gets stored in the xfdf. The 'custom' field doesn't seem to be stored either. Is there any way to attach custom data to an annotation, to also be stored in that annotations xfdf?

Matt Parizeau

unread,
Mar 22, 2018, 2:22:55 PM3/22/18
to PDFTron WebViewer
Yep, see here for how to save and load a custom field https://groups.google.com/d/msg/pdfnet-webviewer/lptUPUcV80c/1NUgYZ_8AwAJ

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