PDF.js Express Version
7.3.1
Detailed description of issue
As I was unable to get any response from this feature request thread -
So I had to recreate this for technical support as this is doable and also its working as expected but annotations after flipped are NOT getting saved/export. Actually annotationChanged event isn’t getting triggered so they are not getting exported. For export I am using - instance.annotManager.exportAnnotations()
.
I have even tried to trigger annotationChanged event (modify call) for flipped annotation manually by -
this.viewerInstance.annotManager.trigger('annotationChanged', [[annot], 'modify', {}]);
Still they are getting saved/exported but without flip(original annotations before flip).
Expected behaviour
Annotations after flipped should get exported same as other annotations do like AREA and PERIMETER annots.
Code snippet
const annots = this.viewerInstance.annotManager.getSelectedAnnotations();
annots.forEach(annot => {
annot = this.flipAnnotVertically(annot);
this.viewerInstance.annotManager.trigger(‘annotationChanged’, [[annot], ‘modify’, {}]);
this.viewerInstance.annotManager.redrawAnnotation(annot);
});