THotPDF.GetLoadedAnnotationInfo Method

Reads the subtype and position rectangle of a specific annotation on a specified page of the loaded PDF, facilitating rapid filtering and locating of specific annotations without parsing the entire dictionary

Declaration

function GetLoadedAnnotationInfo(PageIndex, AnnotationIndex: Integer; out ASubtype: AnsiString; out ARect: THPDFRect): boolean;

Unit

HPDFDoc

Parameters

NamePurpose
PageIndexZero-based index of the target page
AnnotationIndexThe zero-based index of the target annotation in the page's Annots array
ASubtype输出参数,接收注释的 Subtype 字符串,如 TextLinkWidget
ARectOutput parameter, receives the position rectangle of the annotation on the page (PDF coordinate system)

Return value

若成功读取注释信息则返回 True,索引越界或注释解析失败时返回 False,且输出参数值未定义

Usage notes

Related APIs