# Flipped annotations aren't triggering annotationChanged (modify) event, also NOT getting saved/export

**URL:** <https://pdfjs.community/t/flipped-annotations-arent-triggering-annotationchanged-modify-event-also-not-getting-saved-export/591>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [March 9, 2021, 4:58pm UTC](https://pdfjs.community/t/flipped-annotations-arent-triggering-annotationchanged-modify-event-also-not-getting-saved-export/591 "2021-03-09T16:58:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiran.patil](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kiran.patil](https://pdfjs.community/u/kiran.patil)\
**Post date:** [March 9, 2021, 4:58pm UTC](https://pdfjs.community/t/flipped-annotations-arent-triggering-annotationchanged-modify-event-also-not-getting-saved-export/591/1 "2021-03-09T16:58:48Z")

</div>

**PDF.js Express Version**  
7.3.1

**Detailed description of issue**  
As I was unable to get any response from this feature request thread -

> [@Flip annotations horizontally and vertically feature](https://pdfjs.community/t/flip-annotations-horizontally-and-vertically-feature/551):
>
> PDF.js Express Version 7.3.0 Detailed description of issue Flip Annotations horizontally and vertically is what I expect from Pdfjs-Express. Its a very high priority feature for us. Infact many of us who’s here from AutoCad. So I would expect this feature ASAP if possible. Or else a work-around for this. Expected behaviour User will select all those annotations which he/she wants to flip it either vertically or horizontally. Annotations should get flipped at their place. Code snippet A wo…

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);  
> });

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [March 9, 2021, 5:12pm UTC](https://pdfjs.community/t/flipped-annotations-arent-triggering-annotationchanged-modify-event-also-not-getting-saved-export/591/2 "2021-03-09T17:12:08Z")

</div>

Closing as duplicate of [Flip annotations horizontally and vertically feature - #3 by kiran.patil](https://pdfjs.community/t/flip-annotations-horizontally-and-vertically-feature/551/3)

Please do not create new threads if you do not receive a response for a few days. We have our priorities and we will get to your questions when time permits.

Thanks

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [March 9, 2021, 5:12pm UTC](https://pdfjs.community/t/flipped-annotations-arent-triggering-annotationchanged-modify-event-also-not-getting-saved-export/591/3 "2021-03-09T17:12:10Z")

</div>



---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [March 9, 2021, 5:12pm UTC](https://pdfjs.community/t/flipped-annotations-arent-triggering-annotationchanged-modify-event-also-not-getting-saved-export/591/4 "2021-03-09T17:12:15Z")

</div>


