Eric Boivin
unread,Sep 12, 2017, 4:44:19 PM9/12/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PDFTron WebViewer
When I use the WebViewer on a computer and try to automatically save the annotations, everything works fine. But when using an iPad, readerControl.saveAnnotations() doesn't seem to work (nothing happens).
Here's the code in the config.js file:
$(document).on('documentLoaded', function () {
var annotManager = readerControl.docViewer.getAnnotationManager();
annotManager.on('annotationChanged', function (e, annotation, action) {
if (e.imported) {
return;
}
switch(action) {
case "add":
readerControl.saveAnnotations();
break;
case "modify":
readerControl.saveAnnotations();
break;
case "delete":
readerControl.saveAnnotations();
break;
}
});
});
I also tried to add a custom button in the mobile toolbar with the event readerControl.saveAnnotations() with the same results. But the button works well on a computer.