THotPDF.GetLoadedFormFieldOptions Method
Returns the list of export values for all options in a loaded PDF form field as an array of strings
Declaration
function GetLoadedFormFieldOptions(FieldIndex: Integer): THPDFAnsiStringArray;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | The zero-based index of the target form field |
Return value
返回 THPDFAnsiStringArray,包含该字段所有选项的导出值;若字段无选项则返回空数组
Usage notes
- 返回的数组顺序与 PDF 内部选项列表顺序一致,可直接用下标与
GetLoadedFormFieldOption配合使用 - Only applicable to ComboBox or ListBox type fields; calling on text fields or check boxes will return an empty array
- 若需同时获取显示文本,应逐项调用
GetLoadedFormFieldOption而非仅依赖本方法的返回值