How to bind the Stored Annotation for pdf

564 Views Asked by At

I am using annotator.js to annotate my PDF documents. I am able to save it to my SQL database and retrieve it. But I am not sure how to Bind back the data on to the specific page. I am using Pure HTML, JQuery for the AnnotatorJS API calls and REST web service to send and receive data in JSON format.

My problem is what are the steps required to use the retrieved data from my SQL database and bind it on to the PDF.

Any suggestions?

1

There are 1 best solutions below

0
On

I had similar problem before. Try this code. You can change your code accordingly

var subscription= $('#content').annotator();
subscription.data('annotator').plugins['Store'].loadAnnotationsFromSearch().then(function(res) {
subscription.annotator('loadAnnotations', res.rows); res.rows /// in my case
});