We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to save and retrieve the annotations from the database?

How to save and retrieve the annotations from the database?

You can save and retrieve the TextMarkup annotations separately from the PDF viewer as a workaround. Refer to the following code,





Sample :


In the above sample, a button Save Annotations is provided for saving the annotations included in the PDF viewer control to the database table. The annotations which are added, modified and deleted will be added to the database when the Save Annotations button is clicked.  

Another button Show Annotations is provided for showing the saved annotations as html list, so that user can click on the annotation and the saved annotation will be retrieved from the database and included in the PDF document and the PDF viewer control is launched again. 

 During this operation, the annotations that are added as single annotation will be saved as multi-line markup annotation and on clicking the html list only that part of the annotation will be rendered in PDF Viewer. Because, at present we do not support to add text markup annotations across multiple lines as single annotation.



Modify the web action methods in the API controller as per your entries in database. We have three entries ID, PageNumber and Annotation to store ID of the PDF document and the serialized string with annotation. Also, modify the connection string of the database in the web.config file.    


Article ID: Published Date: Last Revised Date: Platform: Control:
9068 08/01/2018 08/02/2018 ASP.NET MVC PdfViewer
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon