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
});
}
});
annotations.forEach(function(annotation) {
annotationManager.exportAnnotations({
annotList: [annotation]
});
});