PDFium Delphi Component Docs

AnnotationObjectCount method

Component: TPdf  ·  Unit: PDFium
Count the page objects an annotation draws itself from.

Syntax

function AnnotationObjectCount(Index: Integer): Integer;

IndexInteger. Zero-based index of the annotation on the current page. An index outside AnnotationCount raises EPdfError.
ResultInteger. Number of page objects owned by that annotation, or 0 when the annotation draws from an appearance stream instead.

Description

Ink and stamp annotations carry their artwork as page objects rather than as page content, so this is the entry point for inspecting or editing what such an annotation shows

Other subtypes normally return 0: their appearance comes from the /AP stream, which PDFium does not expose as an object list

The count is a live value. It changes as soon as AddPathToAnnotation or RemoveAnnotationObject runs

See Also

AnnotationObjectInfo, AddPathToAnnotation, RemoveAnnotationObject, AnnotationCount