Dim annotationManager As AnnotationManager = New AnnotationManager()
If (annotationManager.InitFromFile("image1.jpeg") = GdPictureStatus.OK) AndAlso
(annotationManager.PageCount > 0) AndAlso (annotationManager.SelectPage(1) = GdPictureStatus.OK) Then
Dim annotBase As String = annotationManager.SaveAnnotationsToXMPBase64()
If annotationManager.GetStat() = GdPictureStatus.OK Then
annotationManager.Close()
If (annotationManager.InitFromFile("image2.jpeg") = GdPictureStatus.OK) AndAlso
(annotationManager.PageCount > 0) AndAlso (annotationManager.SelectPage(1) = GdPictureStatus.OK) AndAlso
(annotationManager.LoadAnnotationsFromXMPBase64(annotBase) = GdPictureStatus.OK) Then
If annotationManager.SaveDocumentToJPEG("image2_updated.jpeg", 75) = GdPictureStatus.OK Then
MessageBox.Show("Done!", "AnnotationManager.SaveAnnotationsToXMPBase64")
End If
annotationManager.Close()
Else
MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64")
End If
Else
MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64")
End If
Else
MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64")
End If
annotationManager.Dispose()
AnnotationManager annotationManager = new AnnotationManager();
if ((annotationManager.InitFromFile("image1.jpeg") == GdPictureStatus.OK) &&
(annotationManager.PageCount > 0) && (annotationManager.SelectPage(1) == GdPictureStatus.OK))
{
string annotBase = annotationManager.SaveAnnotationsToXMPBase64();
if (annotationManager.GetStat() == GdPictureStatus.OK)
{
annotationManager.Close();
if ((annotationManager.InitFromFile("image2.jpeg") == GdPictureStatus.OK) &&
(annotationManager.PageCount > 0) && (annotationManager.SelectPage(1) == GdPictureStatus.OK) &&
(annotationManager.LoadAnnotationsFromXMPBase64(annotBase) == GdPictureStatus.OK))
{
if (annotationManager.SaveDocumentToJPEG("image2_updated.jpeg", 75) == GdPictureStatus.OK)
MessageBox.Show("Done!", "AnnotationManager.SaveAnnotationsToXMPBase64");
annotationManager.Close();
}
else MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64");
}
else MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64");
}
else MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64");
annotationManager.Dispose();