THotPDF.GetLoadedFormFieldIndexForAnnotation
将一个已加载的页面注释映射到其对应的终端 AcroForm 字段和 widget 序号
声明
function GetLoadedFormFieldIndexForAnnotation(PageIndex,
AnnotationIndex: Integer; out WidgetIndex: Integer): Integer;
返回值是从 0 开始的字段索引,WidgetIndex 接收该字段内从 0 开始的 widget 序号
方法返回 -1 并将 WidgetIndex 设为 -1,触发条件包括:坐标无效、注释不是 widget,或孤立 widget 未在 /AcroForm /Fields 下注册
注释重新排序之后,请使用返回的对象标识映射,不要继续沿用之前保存的注释索引