GdPicture.NET.14.API
GdPicture14 Namespace / AnnotationManager Class
Properties Methods Events

In This Topic
AnnotationManager Class Members
In This Topic

The following tables list the members exposed by AnnotationManager.

Public Constructors
 NameDescription
Public ConstructorA standard constructor for the AnnotationManager class. It initializes an instance of the AnnotationManager class.  
Top
Public Properties
 NameDescription
Public PropertyGets the page number of the currently selected page of the document handled by this AnnotationManager object. The pages are numbered starting from 1.  
Public PropertyGets the total number of pages in the document currently handled by this AnnotationManager object.  
Top
Public Methods
 NameDescription
Public MethodAdds a new GdPicture/XMP annotation from an XML definition on the selected page of the document currently handled by this AnnotationManager object. You can use the AnnotationManager.GetAnnotationXML method to obtain an annotation XML data.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodAdds and attaches a new GdPicture/XMP comment annotation to already existing annotation located on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A comment annotation enables users to share information (comments, answers, reviews) related to the connected annotation.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeComment. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationComment class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP connected lines annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A connected lines annotation depicts a polyline consisting of several straight lines. This method uses the round cap style on both polyline ending points.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeConnectedLines. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationConnectedLines class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP custom annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified.

Custom annotations are identified through the ModelID identifier, which you subsequently have to use in the AnnotationManager.OnCustomAnnotationPaint event. This event renders the required annotation according to what you specify for each ModelID inside the event respecting the defined dimensions.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeCustom. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationCustom class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP ellipse annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. This annotation represents a filled and bordered ellipse or circle drawn with the specified colors.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeEllipse. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationEllipse class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodOverloaded. Adds a new GdPicture/XMP embedded image annotation on the selected page of the document currently handled by this AnnotationManager object.  
Public MethodAdds a new GdPicture/XMP embedded image annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. This annotation embeds the image from a bitmap file stored in base64 string on the page within the defined rectangle area.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeEmbeddedImage. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationEmbeddedImage class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP freehand annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A freehand annotation is a drawn line consisting of several connected line segments.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeFreeHand. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationFreeHand class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP freehand highlighter annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A freehand highlighter annotation is a drawn line consisting of several connected line segments, which highlights the covered area.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeFreeHandHighlighter. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationFreeHandHighlighter class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP freehand polygon annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A freehand polygon is an arbitrary closed shape filled and bordered with the specified colors.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeFreeHandPolygon. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationFreeHandPolygon class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP line annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A line annotation presents a single straight line drawn with the defined color, which uses the flat cap style on both its ending points.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeLine. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationLine class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP line arrow annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. This annotation depicts a straight line with an arrow on its ending point.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeLineArrow. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationLineArrow class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP link annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A link annotation depicts the defined text, that points to a link destination, that means to a web site or to a page in the current document.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeLink. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationLink class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP polygon annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. This annotation represents a filled and bordered polygon drawn with the specified colors.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypePolygon. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationPolygon class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP poly ruler annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A poly ruler annotation consists of several connected lines presenting its entire length in the specified measurement unit.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypePolyRuler. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationPolyRuler class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP rectangle annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. This annotation represents a filled and bordered rectangle drawn with the specified colors.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeRectangle. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationRectangle class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP rectangle highlighter annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. This annotation highlights a defined rectangle area with the specified color.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeRectangleHighlighter. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationRectangleHighlighter class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public Method  
Public MethodAdds a new GdPicture/XMP rubber stamp annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. This annotation shows a stamp mark of the specified stamp within the defined rectangle area.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeRubberStamp. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationRubberStamp class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP ruler annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A ruler annotation depicts a single drawn line from the defined starting point to the defined ending point showing its length in the specified measurement unit.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeRuler. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationRuler class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP sticky note annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A sticky note annotation writes the specified text within the defined rectangle area, which can be filled and bordered.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeStickyNote. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationStickyNote class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodAdds a new GdPicture/XMP text annotation on the selected page of the document currently handled by this AnnotationManager object according to the parameters you have specified. A text annotation writes the specified text within the defined rectangle area.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeText. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationText class right after the successful creation of the annotation object.

Be aware that annotations are always treated relative to the currently selected page.

 
Public MethodOverloaded. Burn, in other words flatten, the GdPicture/XMP annotations into the selected page of the document currently handled by this AnnotationManager object.  
Public MethodCloses the current AnnotationManager object by releasing the loaded document and all related annotations data. It is a good practice to call this method when you complete all the necessary annotation handling of the document.  
Public MethodRemoves a required GdPicture/XMP annotation object specified by its index related to the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodDisposes already used AnnotationManager object completely. All related resources used by this object are released.  
Public MethodReturns the number of all GdPicture/XMP annotation objects contained within the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodGets both the horizontal and the vertical flip states of a required GdPicture/XMP annotation object specified by its index related to the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodReturns a required GdPicture/XMP annotation object specified by its index related to the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodReturns an index of the specified GdPicture/XMP annotation object within the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodReturns the current value of a required annotation property of a GdPicture/XMP annotation object specified by its index related to the selected page of the document currently handled by this AnnotationManager object.

This method has been initially introduced for the COM interop edition. Please refer to the Annotations Namespace for the .NET edition to determine available annotation properties and explore them for each particular class. All annotations classes share their properties from the main Annotation class and add their own properties to the individual classes according to the annotation type.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodReturns the type of a required GdPicture/XMP annotation object specified by its index related to the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodSaves the annotation data of the required GdPicture/XMP annotation object, that is specified by its index related to the selected page of the handled document, to an XML formatted string. You can subsequently use the AnnotationManager.AddAnnotationFromXML method to add the exactly same annotation wherever you need.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodReturns an index of the first GdPicture/XMP comment annotation, if any exists, that is attached to a GdPicture/XMP annotation object specified by its index related to the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodReturns an array of GdPicture/XMP annotations, sorted by their Z-order, which are contained on the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodReturns the status of the last executed operation with the current AnnotationManager object.  
Public MethodInitializes the current AnnotationManager object from a file according to a file path you have specified. The document previously handled by this AnnotationManager object will automatically close.

All document formats currently supported by the toolkit are listed here.

Be aware that the AnnotationManager object only handles GdPicture/XMP annotations contained in the source document.

 
Public MethodInitializes the current AnnotationManager object from a required GdPictureImage object identified by an unique image identifier. The document previously handled by this AnnotationManager object will automatically close.

Be aware that the AnnotationManager object only handles GdPicture/XMP annotations contained in the source image.

 
Public MethodInitializes the current AnnotationManager object from a PDF document handled by a specified GdPicturePDF object. The document previously handled by this AnnotationManager object will automatically close.

Be aware that the AnnotationManager object only handles GdPicture/XMP annotations contained in the source PDF document.

 
Public MethodInitializes the current AnnotationManager object from a previously instantiated GdViewer object. The document previously handled by this AnnotationManager object will automatically close.

This method only initialises the AnnotationManager object, it means this AnnotationManager object will not be connected to the source GdViewer object. You need to use the GdViewer.GetAnnotationManager() method to have these objects linked for further usage, for example, when deleting annotations.

Be aware that the AnnotationManager object only handles GdPicture/XMP annotations available through the source GdViewer object.

 
Public MethodOverloaded. Initializes the current AnnotationManager object from an instantiated Stream object according to what you have specified.  
Public MethodOverloaded. Loads the GdPicture/XMP annotations from a properly formatted file or stream and subsequently applies them to the document currently handled by this AnnotationManager object.  
Public MethodLoads the GdPicture/XMP annotations from a specified Base64 encoded string, that has been previously generated using the AnnotationManager.SaveAnnotationsToXMPBase64 method or the AnnotationManager.SaveAnnotationsToXMPBase64Ex method. The loaded annotations are subsequently applied to the document currently handled by this AnnotationManager object to the selected page or all pages, respectively. This means that the loaded annotations will replace the current annotations presented in the document.

Be aware that this method only handles GdPicture/XMP annotations.

 
Public Method Renders the appearance of a specific annotation into a GdPicture image.  
Public MethodRotates clockwise by a specified angle all GdPicture/XMP annotations contained within the selected page of the document currently handled by this AnnotationManager object. The coordinate system of the currently selected page is used to determine the rotation direction.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodForces the AnnotationManager object to save GdPicture/XMP annotations to the currently selected page of the handled document. Be aware that annotations are always treated relative to the current page.

This method only attaches rendered annotations to the currently selected page while keeping them in the GdPicture/XMP format. You need to use the AnnotationManager.BurnAnnotationsToPage method to permanently include them into the page content.

This method is applied internally automatically on each page change.

 
Public MethodOverloaded. Saves the GdPicture/XMP annotation part of the selected page of the document handled by this AnnotationManager object in XML format to a file or to a stream.  
Public MethodSaves the GdPicture/XMP annotation part of the selected page of the document currently handled by this AnnotationManager object to a Base64 encoded string.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodSaves the GdPicture/XMP annotation part of all pages of the document currently handled by this AnnotationManager object to a Base64 encoded string.

Be aware that this method only handles GdPicture/XMP annotations.

 
Public MethodOverloaded. Saves the GdPicture/XMP annotation part of all pages of the document handled by this AnnotationManager object in XML format to a file or to a stream.  
Public MethodOverloaded. Saves the document handled by this AnnotationManager object to a file in JPEG format with full GdPicture XMP annotation suppport.  
Public MethodOverloaded. Saves the document handled by this AnnotationManager object to a file in PDF format with full GdPicture XMP annotation suppport.  
Public MethodOverloaded. Saves the document handled by this AnnotationManager object to a file in TIFF format with full GdPicture XMP annotation suppport.  
Public MethodSelects the page to be operated further in the document currently handled by this AnnotationManager object. It is always necessary to select the required page before handling the document.  
Public MethodSets both the horizontal and the vertical flip states of a required GdPicture/XMP annotation object specified by its index related to the selected page of the document currently handled by this AnnotationManager object.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public MethodChanges the current value of an annotation property, which is defined by its name, to a newly specified value. The GdPicture/XMP annotation object is specified by its index and relates to the selected page of the document currently handled by this AnnotationManager object.

This method has been initially introduced for the COM interop edition. Please refer to the Annotations Namespace for the .NET edition to determine available annotation properties and explore them for each particular class. All annotations classes share their properties from the main Annotation class and add their own properties to the individual classes according to the annotation type.

Be aware that this method only handles GdPicture/XMP annotations. Likewise, annotations are always treated relative to the selected page.

 
Public Methodstatic (Shared in Visual Basic)Validates GdPicture/XMP annotations from a stream containing annotations data previously generated by the AnnotationManager.SaveAnnotationsToXMP method or the AnnotationManager.SaveAnnotationsToXMPEx method.

Using this method you can very quickly check out if the specified stream is properly formatted and it can be used for further applying of annotations. Please note, that this method is static and therefore it does not depend on any document.

Be aware that this method only handles GdPicture/XMP annotations.

 
Top
Public Events
 NameDescription
Public EventThis event is raised when a custom annotation is to be rendered. Your custom ModelID identifier, that you have defined when adding the custom annotation, should be used internally in this event to render the required annotation, as it is demontrated in the Example section below.

Please check the corresponded AnnotationManager.OnCustomAnnotationPaintEventHandler for given parameters.

The bounding box for the annotation appearance, that you need to follow, is defined by values x, y, w, h, where x and y define the coordinates of the top-left corner of the box as x = (Annot.Left - Annot.Width) / 2, y = (Annot.Top - Annot.Height) / 2, w defines the width of the box as w = Annot.Width and y defines the height of the box as y = Annot.Height.

The measurement unit used for specified dimensions and sizes is expressed in inches. The rotation, if any, is handled by the component, which automatically sets the required transformation.

 
Public EventThis event is raised right after the currently processed page has been successfully created and saved. It is only applied when the initial document is image-based.

Please check the corresponded AnnotationManager.SavingProgressEventHandler for given parameters.

The event is only raised when processing documents based on images using the AnnotationManager.SaveDocumentToPDF or the AnnotationManager.SaveDocumentToTIFF methods and its overloads. The event is not raised, if your initial document is in PDF or TXT format and you are saving it using the AnnotationManager.SaveDocumentToPDF method and its overloads. The event is not raised using the AnnotationManager.SaveDocumentToJPEG method and its overloads as well.

 
Top
See Also