Do you have an issue with a specific file(s)? yes
Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server? yes
Does the issue only happen on certain browsers? no
Is your issue related to a front-end framework?
Is your issue related to annotations? yes
Please give a brief summary of your issue:
I have few customized stamp annotations. And i am setting the width and height of the stamps when annotations are added as shown below:
annotationManager.addEventListener(âannotationChangedâ, (annotations, action, { imported }) => {
if (!imported && annotations.length == 1) {
const annot = annotations[0];
if (annot instanceof instance.Core.Annotations.StampAnnotation && action === âaddâ) {
annot.Width = 100;
annot.Height = 35;
instance.Core.annotationManager.redrawAnnotation(annot);
}
}
});
The issue is when I rotate a page in pdf file and add the stamp. The height and width are swapped which makes the stamp to look weird.
Annotation added on portrait page: Height(35) and Width(100) are maintained as mentioned
I dont want to rotate the annotation in landscape pages.
Is there any way to add annotation as it is in landscape pages without rotating the annotation?
like this
Unfortunately, we donât have an API to set the rotation of the annotation on creation. The method shared above is a way to rotate the annotation on creation.
If you load a landscape document on the showcase and then proceed to create an annotation (i.e. free-text) you can see that the annotation also has its rotation applied: