I’m using Apryse in a React app to let users place anotations on PDF documents. The issue I’m facing is that on some documents, the widget annotations (TEXT_FORM_FIELD) appear rotated vertically (90°) instead of being horizontal.
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems like you’re having an issue with widget annotations appearing rotated due to the page rotation settings in your PDF documents. This can indeed be confusing, especially if the document’s rotation is not being reset as expected.
Some things you can try:
Ensure that the annotation’s rotation is set according to the document’s rotation. Use annotation.Rotation = documentViewer.getCompleteRotation(pageIndex) * 90; to set the rotation correctly.
Check if setting the NoRotate property affects the rendering. If set to true, the annotation should ignore page rotations.
Ensure that you’re applying the rotation settings after the document is fully loaded using the documentLoaded event listener.
Use the FieldManager to adjust settings for the field if necessary, though it seems your current usage is correct for setting field values.
Here are some resources that might help you:
APIs for PDF form filling - This guide details the APIs available for managing fields and annotations, which might help you manage the rotation issue.
Styling PDF form fields - This resource explains how to style and manipulate widget DOM elements, which could be useful for custom adjustments.
InteractiveForms - Sample code for using Apryse SDK with interactive forms, which could help you better understand form manipulation.
Hi,
I’ve already tried changing the rotation with annotation.Rotation, but it only changes the position of the annotation, not the “selection rectangle”.
Annotation on a document with correct orientation:
If I apply the rotation on the annotation (free-text), when the page has a rotation of 1, then the annotation will appear rotated as well as the input text: