Hi,
I'm trying to save PDF annotations to the database, and then when I reload the document, apply those annotations.
I was successful in saving the text annotations using the method you described in this link: https://www.syncfusion.com/kb/9068/how-to-save-and-retrieve-the-annotations-from-the-database
However, I can't find a sensible way of retrieving and injecting the saved annotations back into the viewed PDF file. This would preferrably be done through javascript. From what I could figure out from the code I downloaded from the above link, you're re-rendering the entire PDF file with annotations on the backend, then sending it to the frontend and loading it in the PDF viewer. This doesn't sound reasonable, and I don't have access to C# backend where I could do this, as per your example. My backend is PHP.
Since I can send the annotations as a JSON to the frontend (the same way they were initially saved into the database), I need a method on the PdfViewer which can render these annotations on the PDF file I'm currently viewing.
Here's the annotation data which I can provide to the frontend and send to PdfViewer - https://paste.laravel.io/80713636-c55a-4779-822d-d5e32df01e2c
https://ej2.syncfusion.com/documentation/api/pdfviewer#addannotation - this method doesn't exist.
I've tried digging deeper into the ej2instance of the PdfViewer and messing around with `storeAnnotationCollection` etc., but none of that worked.
Can you please provide an example of how I can programmatically render previously saved annotations on the currently viewed PDF document using preferrably Javascript, or as a backup option, PHP?
Thank you,
regards,
Tomislav