Dim annotationManager As AnnotationManager = New AnnotationManager()
If annotationManager.InitFromFile("source.pdf") = GdPictureStatus.OK Then
Dim annotBase As String = annotationManager.SaveAnnotationsToXMPBase64Ex()
If annotationManager.GetStat() = GdPictureStatus.OK Then
annotationManager.Close()
If (annotationManager.InitFromFile("dest.pdf") = GdPictureStatus.OK) AndAlso
(annotationManager.LoadAnnotationsFromXMPBase64(annotBase) = GdPictureStatus.OK) Then
If annotationManager.SaveDocumentToPDF("dest_updated.pdf") = GdPictureStatus.OK Then
MessageBox.Show("Done!", "AnnotationManager.SaveAnnotationsToXMPBase64Ex")
End If
annotationManager.Close()
Else
MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64Ex")
End If
Else
MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64Ex")
End If
Else
MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64Ex")
End If
annotationManager.Dispose()
AnnotationManager annotationManager = new AnnotationManager();
if (annotationManager.InitFromFile("source.pdf") == GdPictureStatus.OK)
{
string annotBase = annotationManager.SaveAnnotationsToXMPBase64Ex();
if (annotationManager.GetStat() == GdPictureStatus.OK)
{
annotationManager.Close();
if ((annotationManager.InitFromFile("dest.pdf") == GdPictureStatus.OK) &&
(annotationManager.LoadAnnotationsFromXMPBase64(annotBase) == GdPictureStatus.OK))
{
if (annotationManager.SaveDocumentToPDF("dest_updated.pdf") == GdPictureStatus.OK)
MessageBox.Show("Done!", "AnnotationManager.SaveAnnotationsToXMPBase64Ex");
annotationManager.Close();
}
else MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64Ex");
}
else MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64Ex");
}
else MessageBox.Show("Error! Status: " + annotationManager.GetStat().ToString(), "AnnotationManager.SaveAnnotationsToXMPBase64Ex");
annotationManager.Dispose();