GetFormFieldPageRect

Form fields, viewer interaction

Description

Reports the page and rectangle of one form field widget in the top-down page user space the viewer's in-place editors and overlays consume

The rectangle comes from GetFormFieldBound normalized for the library's current GetOrigin setting, so the value matches the coordinate space of PageRectToClientRect and search-hit highlighting regardless of which origin convention the application selected

Syntax

Delphi

Function TPDFlibViewer.GetFormFieldPageRect(FieldIndex: Integer; Out APage: Integer; Out XPt, YPt, WPt, HPt: Double): Boolean;

Parameters

FieldIndexOne-based form field index from GetFormFieldCount
APageReceives the one-based page number hosting the widget
XPt, YPtReceive the widget origin in top-down page user-space points
WPt, HPtReceive the widget size in page user-space points

Return values

TrueThe page and rectangle were reported
FalseNo library is attached, the index is not a form field, or the field has no page in the loaded document; all outputs are zero

See also

FormFieldAtPagePoint, ToggleCheckBoxField, GetFormFieldTabSequence, GetFormFieldEditorKind, PageRectToClientRect