Do you have an issue with a specific file(s)? Yes
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? Yes
Is your issue related to annotations? Yes
Please give a brief summary of your issue:
Custom Annotations do not have the ability to rotate.
Please describe your issue and provide steps to reproduce it:
I am creating a custom annotation to be able to render a custom annotation, and I need the ability to rotate that annotation to place it in the correct place of the document, that sometimes could be in a different angle.
At the moment the example provided by PDFTron on its website only shows how to make a custom annotation resizable, but not how to make that annotation capable of rotating itself. (Link)
Moreover the Annotations.RotationControlHandle is not public, but you can find it in the official documentation.
Please provide a link to a minimal sample where the issue is reproducible:
If you read the documentation, you can find out the “Rotation” property is working for FreeHand, Polyline, Polygon and Stamp… but I am not able to make a stamp able to rotate… I could change my annotation to be a Stamp, so how can I make it rotate?
Regarding Annotations.RotationControlHandle, you can find that class on the PDFTron documentation webpage, and in theory is the one you need to use to render a Rotation Button, to allow users to rotate the annotations. Even this class is in the documentation, what means it is public, when you try to create a SelectModel class for the annotation, you get an error because that class is not really public.
Regarding the Rotation property, I know I can set that property manually when I load the annotations, but I need the users to decide the rotation they want to render, and if the RotationControlHandle is not public, there is no way to show that control to the user.
I see what you mean now.
Thank-you for your patience in helping me clarify the issue.
So yes you are correct, although RotationControlHandle is public and documented, it looks like we did not expose it for our customers to use.
We are currently investigating and discussing with the team on how to best handle this case as stated above: currently not all annotations support this rotation control handle.
From speaking internally with the team.
We will expose the rotation control handle class so that we can use it.
We will also add additional information in the documentation of what is supported.
I will update you further once the changes are in.
The changes have been merged to our nightly stable: https://www.pdftron.com/nightly/#stable/.
The change should be in a nightly stable build after June 25th (not inclusive) .