SaveAnnotationsToPage() Method
In This Topic
Forces the GdViewer control to save GdPicture/XMP annotations to the current page defined by the CurrentPage property, of the document displayed in the GdViewer control. Be aware that annotations are always treated relative to the currently displayed page.
This method only attaches rendered annotations to the current page while keeping them in the GdPicture/XMP format. You need to use the BurnAnnotationsToPage(Boolean) method to permanently include them into the page content.
This method is applied internally automatically on each page change.
Syntax
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
We strongly recommend always checking this status first.
Example
How to save annotations to the currently displayed page in the viewer.
'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
'Annotate your document.
If GdViewer1.SaveAnnotationsToPage() <> GdPictureStatus.OK Then
MessageBox.Show("Annotations can't be saved. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToPage")
End If
Else
MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToPage")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
//Annotate your document.
if (GdViewer1.SaveAnnotationsToPage() != GdPictureStatus.OK)
MessageBox.Show("Annotations can't be saved. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToPage");
}
else
MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToPage");
Example
How to save annotations to the currently displayed page in the viewer.
'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
'Annotate your document.
If GdViewer1.SaveAnnotationsToPage() <> GdPictureStatus.OK Then
MessageBox.Show("Annotations can't be saved. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToPage")
End If
Else
MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToPage")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
//Annotate your document.
if (GdViewer1.SaveAnnotationsToPage() != GdPictureStatus.OK)
MessageBox.Show("Annotations can't be saved. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToPage");
}
else
MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToPage");
See Also