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 normalised 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
| FieldIndex | One-based form field index from GetFormFieldCount |
|---|---|
| APage | Receives the one-based page number hosting the widget |
| XPt, YPt | Receive the widget origin in top-down page user-space points |
| WPt, HPt | Receive the widget size in page user-space points |
Return values
| True | The page and rectangle were reported |
|---|---|
| False | No 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