THotPDF.GetLoadedAnnotationCount Method
Returns the total number of annotations on a specified page in the loaded PDF document, used to determine the iteration range before enumerating annotations
Declaration
function GetLoadedAnnotationCount(PageIndex: Integer): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page, returns 0 if out of range |
Return value
Returns the total number of entries in the specified page's annotation array (Annots); returns 0 if the page has no annotations or the page index is invalid
Usage notes
- The count is the number of direct entries in the page's Annots array; nested references are not counted recursively
- Combine this return value with GetLoadedAnnotationInfo to walk every annotation on the page
- Form field controls (Widgets) are also annotation types and are included in this count; they should be treated differently from purely presentational annotations