PDFium Delphi Component Docs

AnnotationSupportsAttachmentPoints method

Component: TPdf  ·  Unit: PDFium
Test whether an annotation type supports quadpoints

Syntax

function AnnotationSupportsAttachmentPoints(AnnotIndex: Integer): Boolean;

AnnotIndexInteger. Zero-based index of an annotation on the active page
ResultBoolean. True for annotation types that accept quadpoints, principally text markup and link annotations

Description

PDFium distinguishes two questions that are easy to conflate: whether an annotation type accepts quadpoints, and whether this particular annotation currently has any. TPdfAnnotation.HasAttachmentPoints answers the second by reporting stored quadpoint sets; this method answers the first through FPDFAnnot_HasAttachmentPoints

Use it before constructing an edit that writes quadpoints: a newly created highlight or link supports them even whilst its stored set is still empty, so a check based only on stored data would wrongly reject the edit

The page must be active and AnnotIndex must be within the annotation count of that page. The annotation handle opened for the query is closed before the call returns

See Also

PageObjectInfo, LinkAnnotation, AddPathToAnnotation