How to rotate page with annotations on it

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
Posts: 7
Joined: Tue Jun 08, 2010 5:52 pm

How to rotate page with annotations on it

Post by Vladimir » Fri Jul 22, 2011 11:15 am


I have two buttons on my form: RotateToLeftButton and RotateToRightButton.
On click of this buttons I run the code like this:

Code: Select all

_imageViewer.Image.Rotate(-90); //for RotateToLeftButton
_imageViewer.Image.Rotate(90); //for RotateToRightButton
But if page contains any annotations on it these annotations are not rotated.
Could you give me example how to rotate all annotations on selected page during page rotating?

I tried to rotate them:

Code: Select all

var annotationCollection = _imageViewer.Annotations.GetAnnotations(_imageViewer.FocusedIndex);
foreach (AnnotationBase annotationBase in annotationCollection) 
   annotationBase.Rotation = annotationBase.Rotation + 90;
but they lost their positions on page.

Site Admin
Posts: 1628
Joined: Thu Jul 10, 2008 2:21 pm

Re: How to rotate page with annotations on it

Post by Alex » Fri Jul 22, 2011 8:17 pm

Hello Vladimir,

You need to use the AnnotationController.RotateImageWithAnnotations method if you want to rotate image with annotations.

Here is an example how to rotate the image with annotations:

Code: Select all

_imageViewer.Annotations.RotateImageWithAnnotations(0, 90);
Please read the description and available properties and methods of the AnnotationController class in the documentation.

Best regards, Alexander

Post Reply