You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pdfnet-w...@googlegroups.com
Hello, I need to open document in WebViewer in a position, where some annotation is. Such as when we click one annotation on Annotation Panel and viewer go to a page and position of selected annotation.
I found, how to jump to some page with .setCurrentPageNumber(), but it show upper part of a page and annotation may lie outside visible area.
Matt Parizeau
unread,
Dec 5, 2014, 5:52:48 PM12/5/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
To do this you would want to use a config file with a bit of custom code. A config file is just a JavaScript file that is executed in the context of the viewer. You can add it by passing the config option to the PDFTron.WebViewer constructor (see WebViewer samples for an example of this).
This sample code jumps to the location of the first annotation using the JumpToAnnotation function and you would put it in your config file:
$(document).on('documentLoaded', function() {
var annotManager = readerControl.docViewer.GetAnnotationManager(); var annot = annotManager.GetAnnotationsList()[0];