GetFieldPageRect

Forms, interaction, input

Description

Returns the rectangle of one visible Widget of a TPDFlibFormSession in the visual coordinate space the session uses for hit testing

The rectangle is expressed after page rotation with the origin at the visual top left, in the library's current measurement units

The page box is read from the inherited /CropBox with /MediaBox fallback, reversed boxes are normalised and geometry with NaN or infinite components or non-positive extents is rejected

The call does not change the library's selected page

Declaration

function GetFieldPageRect(FieldIndex: Integer; out Page: Integer;
  out Left, Top, Width, Height: Double): Integer;

Parameters

FieldIndexField or temporary Widget index to measure
PageReceives the one-based page number containing the Widget
Left, TopReceive the visual top-left corner of the Widget rectangle
Width, HeightReceive the visual extent of the Widget rectangle

Return value

Returns 1 on success, otherwise 0 with all outputs set to zero because the field is invalid, its page cannot be resolved or the geometry is unusable

See also

HitTest, FocusAt, GetTabSequence, GetFormFieldPage, TPDFlibFormSession