How to export XFDF for a single annotation?

100 views
Skip to first unread message

Matt Parizeau

unread,
Sep 26, 2016, 1:12:22 PM9/26/16
to PDFTron WebViewer
Q:

I'm using the following code and want to extract the XFDF for individual annotations. Is this possible?

annotationManager = this.webViewerInstance.getInstance().getDocumentViewer().getAnnotationManager()
annotationManager
.on('annotationChanged', function(event, annotations, actionType) {
 
if (!event.imported) {
    annotations
.forEach(function(annotation) {
     
// Extract xfdf string for each annotation
   
});
 
}
});

A:


annotations.forEach(function(annotation) {
  annotationManager
.exportAnnotations({
    annotList
: [annotation]
 
});
});

Reply all
Reply to author
Forward
0 new messages