pdfnetjs , will it save annotations in offline mode

110 views
Skip to first unread message

Ashish Deshpande

unread,
Jun 8, 2016, 4:56:47 PM6/8/16
to PDFTron WebViewer
Hii 


In the documentations of pdfnetjs https://www.pdftron.com/pdfnet/pdfnetjs/ its mentioned that without server support it will work
but i saw the online running sample of pdfnet (annotations sample) http://pdftron.com/webviewer/pdfnetjs/samples.html?s=pdf


so how it is not dependent on server

And what is the work of exportAnnotation() method in the annotation manager will it save annotations without internet ?


PFA to view the exact problem


Regards
Ashish
annotations1.JPG

Matt Parizeau

unread,
Jun 9, 2016, 3:36:19 PM6/9/16
to PDFTron WebViewer
Hi Ashish,

We provide annotationHandler.php as an example of saving the document's annotations to your server so that you could allow a user to access them across multiple sessions, but it's not necessary for viewing, interacting or even downloading the PDF with annotations. If you press the download button in the top right of the viewer the PDF will be downloaded with all the annotations and does not go through a server at all. Although it looks like the sample you're looking at is of a slightly older version see this link for one with a download button http://pdftron.com/webviewer/demo/samples/annotation/index.html?doctype=pdf.

AnnotationManager's exportAnnotations function just returns an XFDF string of the annotation data. So if you wanted to completely avoid a server for saving annotations you could always modify WebViewer to save and reload the data in the browser's localStorage or an IndexedDB database.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Ashish Deshpande

unread,
Jun 10, 2016, 12:38:30 PM6/10/16
to PDFTron WebViewer
Thanks Matt

Actually i am very new with the WebViewer  am not able to modify the WebViewer  in such a way that it can save the annotations in the browser's local storage can you give some references of docs explaining how to do that
Reply all
Reply to author
Forward
0 new messages