Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.3
|
Leadtools.Documents Namespace > DocumentAnnotations Class : GetAnnotations Method |
public AnnContainer[] GetAnnotations( bool createEmpty )
'Declaration
Public Function GetAnnotations( _ ByVal createEmpty As Boolean _ ) As AnnContainer()
'Usage
Dim instance As DocumentAnnotations Dim createEmpty As Boolean Dim value() As AnnContainer value = instance.GetAnnotations(createEmpty)
public AnnContainer[] getAnnotations(boolean createEmpty)
public: array<AnnContainer^>^ GetAnnotations( bool createEmpty )
GetAnnotations and SetAnnotations can be used to get or set an array of annotations container objects for all pages with a single call. Since the annotations can be stored in a stand-alone file, calling these optimized methods can be a lot faster than iterating through each page and calling DocumentPage.GetAnnotations or DocumentPage.SetAnnotations multiple times.
The result array will contain an AnnContainer object for each page in the document (or null if createEmpty was false and the page does not have any annotations).
Each AnnContainer returned will have its AnnContainer.PageNumber property set to the 1-based page number of the page.
The LEADTOOLS Document Viewer library uses GetAnnotations to obtain the annotation container objects for all pages at once instead of calling individual DocumentPage.GetAnnotations when a new document is loaded in the viewer. And will call SetAnnotations passing any annotation container that has changed by the user instead of DocumentPage.SetAnnotations in preparations for sending the document to the converter for saving.