SaveAnnotationsToXMP(String) Method
Saves the GdPicture/XMP annotation part of the current page of the document displayed in the GdViewer control in XML format to a file according to a file path you have specified.
Be aware that this method only handles GdPicture/XMP annotations.
'Declaration
Public Overloads Function SaveAnnotationsToXMP( _
ByVal As String _
) As GdPictureStatus
Parameters
- FilePath
- The file path of the XML formatted file to create and save all GdPicture/XMP annotations from the current page.
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.
How to transfer GdPicture/XMP annotations from one jpg file to another.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
'Assuming you have already annotated the displayed jpg document.
If GdViewer1.SaveAnnotationsToXMP("annots.xml") = GdPictureStatus.OK Then
GdViewer1.CloseDocument()
If (GdViewer1.DisplayFromFile("test.jpg") <> GdPictureStatus.OK) OrElse
(GdViewer1.LoadAnnotationsFromXMP("annots.xml") <> GdPictureStatus.OK) Then
MessageBox.Show("Error! : " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToXMP")
End If
End If
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
//Assuming you have already annotated the displayed document.
if (GdViewer1.SaveAnnotationsToXMP("annots.xml") == GdPictureStatus.OK)
{
GdViewer1.CloseDocument();
if ((GdViewer1.DisplayFromFile("test.jpg") != GdPictureStatus.OK) ||
(GdViewer1.LoadAnnotationsFromXMP("annots.xml") != GdPictureStatus.OK))
{
MessageBox.Show("Error! : " + GdViewer1.GetStat().ToString(), "GdViewer.SaveAnnotationsToXMP");
}
}