I want to rotate/ flip vertically and horizontally the annotations by 180 degrees. ? How can I do that.
I have annotations to rotate - AnnotationCreateDistanceMeasurement, AnnotationCreateAreaMeasurement
I came to know about this feature from this site - https://pdfjs.express/api/Annotations.Annotation.html
How to invoke Annotations. Annotation for Rotation.
Rotation (number) Gets or sets the annotation’s clockwise rotation in degrees. Valid values are 0, 90, 180 and 270. Only applies to Stamp, FreeText and Caret annotations.
You can not set the rotation of AnnotationCreateDistanceMeasurement annotation by setting the rotation property. The rotation property only applies to Stamp, FreeText and Caret annotations. We can however use the functions setStartPoint and setEndPoint to create the desired rotation. Here is an example where any instance of a line annotation (this includes AnnotationCreateDistanceMeasurement) which is horizontal will toggle between 90deg and 0deg rotation.