Dim annotationManager As AnnotationManager = New AnnotationManager()
If (annotationManager.InitFromFile("image.jpg") = GdPictureStatus.OK) AndAlso
(annotationManager.PageCount > 0) AndAlso (annotationManager.SelectPage(1) = GdPictureStatus.OK) Then
If annotationManager.RotateAnnotations(90) = GdPictureStatus.OK Then
If (annotationManager.SaveAnnotationsToPage() = GdPictureStatus.OK) AndAlso
(annotationManager.BurnAnnotationsToPage(True) = GdPictureStatus.OK) Then
If annotationManager.SaveDocumentToJPEG("image_rotated.jpg", 75) = GdPictureStatus.OK Then
MessageBox.Show("Finished successfully!", "AnnotationManager.RotateAnnotations")
Else
MessageBox.Show("The file can't be saved. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.RotateAnnotations")
End If
Else
MessageBox.Show("Annotations can't be saved or burned. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.RotateAnnotations")
End If
Else
MessageBox.Show("Annotations can't be rotated. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.RotateAnnotations")
End If
annotationManager.Close()
Else
MessageBox.Show("The AnnotationManager can't be properly initialized. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.RotateAnnotations")
End If
annotationManager.Dispose()
AnnotationManager annotationManager = new AnnotationManager();
if ((annotationManager.InitFromFile("image.jpg") == GdPictureStatus.OK) &&
(annotationManager.PageCount > 0) && (annotationManager.SelectPage(1) == GdPictureStatus.OK))
{
if (annotationManager.RotateAnnotations(90) == GdPictureStatus.OK)
{
if ((annotationManager.SaveAnnotationsToPage() == GdPictureStatus.OK) &&
(annotationManager.BurnAnnotationsToPage(true) == GdPictureStatus.OK))
{
if (annotationManager.SaveDocumentToJPEG("image_rotated.jpg", 75) == GdPictureStatus.OK)
MessageBox.Show("Finished successfully!", "AnnotationManager.RotateAnnotations");
else
MessageBox.Show("The file can't be saved. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.RotateAnnotations");
}
else
MessageBox.Show("Annotations can't be saved or burned. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.RotateAnnotations");
}
else
MessageBox.Show("Annotations can't be rotated. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.RotateAnnotations");
annotationManager.Close();
}
else
MessageBox.Show("The AnnotationManager can't be properly initialized. Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.RotateAnnotations");
annotationManager.Dispose();