Customizing annotation attributes.

143 views
Skip to first unread message

Viczenn Reyes

unread,
Sep 28, 2017, 1:39:05 PM9/28/17
to PDFTron WebViewer
Basically our requirement need the annotations to be marked as complete and be visible to the user (ex. highlighted, change color of the whole annotation box) is this possible with just modifying the reader control?

Matt Parizeau

unread,
Sep 28, 2017, 4:02:28 PM9/28/17
to PDFTron WebViewer
If you want to customize the notes panel you could take a look at this post, specifically the noteCreated event https://groups.google.com/d/msg/pdfnet-webviewer/lhdoORmqmjo/p80HESORFgAJ. You can dynamically add buttons or whatever you want to each note using DOM APIs. You can add custom properties on particular annotations using the myannot.Custom field and then read that property to choose how you change the UI for a particular note.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Viczenn Reyes

unread,
Oct 23, 2017, 11:49:34 AM10/23/17
to PDFTron WebViewer
Which file will you add your custom properties? How will I be able to bind my checkbox element value to my xfdf string in the annotation?

Justin Jung

unread,
Oct 24, 2017, 7:04:41 PM10/24/17
to PDFTron WebViewer
Your checkbox could set a custom value using a Custom property on annotation. For example,

myAnnotation.Custom = 'checked';

The diamond sample shows how you can save and load a property to xfdf (https://www.pdftron.com/webviewer/demo/config.html#file=samples/custom-annotations/diamond.js?doctype=xod).

Justin Jung
Reply all
Reply to author
Forward
0 new messages