BurnAnnotationsToPage(Boolean) Method
In This Topic
Burn, in other words flatten, the GdPicture/XMP annotations into the selected page of the document currently handled by this AnnotationManager object.
Burning (flattening) annotations means simply including them directly into the content of the page, to which they belong, so they are not more editable. This will permanently write an annotation into the document, so it is not considered as an annotation anymore.
Please note, that this method uses vector graphics when drawing annotations. To burn your custom annotations, please use the AnnotationManager.BurnAnnotationsToPage method and set the VectorMode parameter to false.
Syntax
Parameters
- RemoveInitialAnnots
- Set this parameter to true, if you want to remove the initial annotation blob content from the file, otherwise set it to false.
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 burn annotations to all pages in the handled document.
'We assume that the GdViewer1 control has been integrated into your application
'and you have annotate the displayed document.
Dim oAnnotationManager As AnnotationManager = GdViewer1.GetAnnotationManager()
Dim status As GdPictureStatus = GdPictureStatus.OK
For i As Integer = 1 To oAnnotationManager.PageCount
status = oAnnotationManager.SelectPage(i)
If status = GdPictureStatus.OK Then
status = oAnnotationManager.BurnAnnotationsToPage(True)
If status <> GdPictureStatus.OK Then Exit For
Else
Exit For
End If
Next
If status <> GdPictureStatus.OK Then
MessageBox.Show("Annotations can't be burned. Status: " + status.ToString(), "AnnotationManager.BurnAnnotationsToPage")
End If
//We assume that the GdViewer1 control has been integrated into your application
//and you have annotate the displayed document.
AnnotationManager oAnnotationManager = GdViewer1.GetAnnotationManager();
GdPictureStatus status = GdPictureStatus.OK;
for (int i = 1; i <= oAnnotationManager.PageCount; i++)
{
status = oAnnotationManager.SelectPage(i);
if (status == GdPictureStatus.OK)
{
status = oAnnotationManager.BurnAnnotationsToPage(true);
if (status != GdPictureStatus.OK) break;
}
else
break;
}
if (status != GdPictureStatus.OK)
MessageBox.Show("Annotations can't be burned. Status: " + status.ToString(), "AnnotationManager.BurnAnnotationsToPage");
See Also