How to save annotations in C#

60 views
Skip to first unread message

Ashish Deshpande

unread,
Jun 3, 2016, 12:53:27 PM6/3/16
to PDFTron WebViewer
I have implemented similar functionality as given in annotationhandler.php in C#

But when I am drawing an annotation its showing messages annotation save success but when I am refreshing the browser the same annotations are not getting loaded in the web viewer.

Can you please help me to save annotations in xod file using c# as done by annotationhandler.php

Matt Parizeau

unread,
Jun 8, 2016, 6:58:26 PM6/8/16
to PDFTron WebViewer
The sample file annotationHandler.php needs to handle both a GET request and a POST request. If the annotations aren't being loaded into the viewer then maybe the GET request isn't being handled correctly. When a GET is made your server should be returning the XFDF string of annotation data, so that's where I would check to see if something is going wrong.

If you want to debug and see what your server is returning to WebViewer you can add breakpoints to BaseReaderControl.js inside the callback function passed to this.docViewer.setInternalAnnotationsTransform. You'll see a call to $.ajax and either the success or error callbacks should be hit.

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