Error processing SSI file
LEADTOOLS Leadtools.Documents (Leadtools.Documents assembly)

Show in webframe

GetAnnotations Method (DocumentPage)






true to create and return an empty LEADTOOLS annotations container if the page does not have one originally, otherwise; false to return null if the page does not have an original container.
Gets the annotations container of this page.
Syntax
public AnnContainer GetAnnotations( 
   bool createEmpty
)
'Declaration
 
Public Function GetAnnotations( _
   ByVal createEmpty As Boolean _
) As AnnContainer
'Usage
 
Dim instance As DocumentPage
Dim createEmpty As Boolean
Dim value As AnnContainer
 
value = instance.GetAnnotations(createEmpty)
public AnnContainer getAnnotations(boolean createEmpty)
            
public:
AnnContainer^ GetAnnotations( 
   bool createEmpty
) 

Parameters

createEmpty
true to create and return an empty LEADTOOLS annotations container if the page does not have one originally, otherwise; false to return null if the page does not have an original container.

Return Value

The annotation container for this page if available, or null.
Remarks

GetAnnotations is used to get the annotations container of this page. All document types support this method.

SetAnnotations is used to replace the annotation container of the page. IsAnnotationsModified is used to as flag that indicates that the annotations container of this page has been replaced by the user.

This method works as follows (the "item" is an annotation container):

  1. If an item was found in the cache, it is returned right away. This is available if the document was created using the cache system. and Document.CacheOptions contains DocumentCacheOptions.PageAnnotations. AnnCodecs is used to load the AnnContainer object from the data found in the cache.

  2. If this is an original page in the source document file (the value of OriginalPageNumber is not -1), then the annotation is container is loaded from the original document. See below for more information.

  3. If this is not an original page in the source document file (the value of OriginalPageNumber is not 1), then depending on the value of createEmpty a new AnnContainer object is created based on the page size and resolution or null is used.

  4. If this document uses the cache system (Document.HasCache is true), then the AnnContainer object is saved to the cache before it is returned. Next time this method is called, the container will be returned from the cache directly without loading it from the file or creating a new instance.

Note that if SetAnnotations has been previously called with a null object for the container parameter, then this method will return null as well.

In all cases, the returned AnnContainer object is not used by this Document, the user is responsible for deleting it after it has been used.

The original annotation of the document is obtained in one of two ways:

In either case, if the original document or annotation file did not have an annotation container for this page, the createEmpty will be used to either return null or create an empty container for the page.

Note that you can use DocumentAnnotations.GetAnnotations and DocumentAnnotations.SetAnnotations to get or set an array of annotations container objects for one or more pages with a single call.

The LEADTOOLS Document Viewer uses this method to obtain the annotation container for the page when.

The LEADTOOLS Document Converter uses this method to obtain annotation container for the page when annotations options are used during convertions.

Refer to Loading Using LEADTOOLS Documents Library for more information.

Requirements

Target Platforms

See Also

Reference

DocumentPage Class
DocumentPage Members

Error processing SSI file
   Leadtools.Documents requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features