Draw icon on some document pages

25 views
Skip to first unread message

Donald Gordon

unread,
Jul 13, 2016, 1:01:21 PM7/13/16
to PDFTron WebViewer
Hi

We're porting an existing iPad app that shows a "bookmark" icon at the top right of some document pages.

How could we achieve this with the WebViewer?  Is there a callback we can hook when a page is drawn, to draw our bookmark icon (or not)?  Should we create a custom annotation type, and then disable the ability to edit or select it?  Is there another way that would be even simpler/more reliable to implement?

Regards

Donald Gordon

Matt Parizeau

unread,
Jul 14, 2016, 8:21:20 PM7/14/16
to PDFTron WebViewer
Hi Donald,

You could hook into the pageComplete event to do this. You could do this with a custom annotation like you mentioned or with a custom HTML element. 

For an example of how to do it as a custom annotation see this post: https://groups.google.com/d/msg/pdfnet-webviewer/zzgi4hGdF6I/vtd_VP4EHzEJ
For an example of how to use an HTML element see this post (you'll probably want to adjust for the zoom level on the scaling of the element as well): https://groups.google.com/d/msg/pdfnet-webviewer/Kth8hiwNs6Q/n-eyrNb46cMJ

Also make sure you're using this build which contains a fix for the pageComplete event https://groups.google.com/d/msg/pdfnet-webviewer/A4dn7uvB2m0/dYLGMeoACQAJ

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