Annotations without Document

15 views
Skip to first unread message

Volker Andres

unread,
Jun 1, 2017, 11:57:44 AM6/1/17
to PDFTron WebViewer
Hi

We are currently looking for a way to sync Annotations between multiple clients. Lets say our app is opened in Firefox and Chrome. Now when the app is opened on both clients and changes to the document are made, these changes need to be synced.

We were thinking about an approach, where a server is just a dump service, which sends only data to the clients. The app needs to parse the data coming from the server (XPDF->JSON/JS), compare it with the own data, sync it, send the synced data back to the server and finally loads it in the currently opened document.

So to make things easier, I would like to know if there is a way to use the AnnotationManager without a document to convert XPDF to JSON/Annotation and JSON/Annotation to XPDF?

Best Regards

Justin Jung

unread,
Jun 2, 2017, 1:59:43 AM6/2/17
to PDFTron WebViewer on behalf of Volker Andres
Hello,

Right now, there is no way to use AnnotationManager without a document loaded.
For realtime collaboration, you could refer to our tutorial: https://www.pdftron.com/webviewer/demo/tutorials/realtime-collaboration.html
It takes the approach of saving XFDF of each annotation individually, and the server notifies each client the changes and stores updates as it receives them.

Justin Jung
Software Developer
PDFTron Systems Inc.

Volker Andres

unread,
Jun 2, 2017, 12:45:18 PM6/2/17
to PDFTron WebViewer
So lets asume, I would save each of these actions. Evertime the document is opened all actions would have to be done in the beginning, right? Do you have experience with how many actions can be done without performance problems?

Justin Jung

unread,
Jun 5, 2017, 7:47:55 PM6/5/17
to PDFTron WebViewer on behalf of Volker Andres
If you look at the realtime collaboration sample, every time the annotation is updated, we update the data in the database for that annotation, which means you would only have the latest state of the annotations and you won't have to replay all the actions when loading.
Reply all
Reply to author
Forward
0 new messages