Gets an array of annotations container objects for all pages with a single call.
public AnnContainer getAnnotations(boolean createEmpty)
true to create and return an empty LEADTOOLS annotation container if the page does not have one originally; otherwise, false to return null if the page does not have an original container.
GetAnnotations and SetAnnotations can be used to get or set an array of annotation 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 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. It will also call SetAnnotations, passing any annotation container that has been changed by the user (instead of DocumentPage.SetAnnotations), in preparation for sending the document to the converter for saving.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries