Returns current-page zero-based widget-field ordinals in the declared PDF tab order, excluding unrelated annotations
function FormFieldTabOrder: TPdfIntegerArray; overload; function FormFieldTabOrder(out Status: TPdfFormTabOrderStatus): TPdfIntegerArray; overload;
Enable AcroForm form filling on an active document or viewer; an empty widget set returns an empty array
Array members are accepted by FocusFormField and FormFieldInfo; they are widget ordinals rather than indexes into the full PDF Annots array
The status overload reports the requested and effective policy, snapshot availability and fallback reason; the original overload uses the same policy and discards status
| Tabs | Widget traversal |
|---|---|
/R | Rows from top to bottom, then the viewer reading direction within each row |
/C | Columns in the viewer reading direction, then top to bottom within each column |
/S | Structure-tree K traversal of OBJR references, followed by unreferenced widgets in annotation-array order |
/A | Annotation-array order projected onto widgets |
/W | Widgets first in annotation-array order; this widget-only API returns the same projection as A, and once snapshot ownership has been validated it reports EffectiveMode=ptmWidget with UsedFallback=False |
R and C include the page's intrinsic /Rotate and catalog ViewerPreferences.Direction, defaulting to L2R when Direction is absent
Geometry uses display coordinates at 1/64 point resolution, deterministic ties and centre-in-anchor grouping for rows or columns; unusually overlapping layouts may be grouped differently by other processors
Tabs is read from the page itself and is not inherited from the page tree; these policies follow ISO 32000-2:2020, section 12.5.1
The W result relates to the widget pass alone; form navigation never shifts focus onto links or other non-widget annotations during the second pass
Missing or unsupported Tabs, unavailable metadata, invalid direction for R/C, malformed structure for S or unsupported geometry return annotation-array widget order with an explicit status reason
A missing structure tree is an empty S traversal, so all widgets form the unstructured tail; UnstructuredWidgetCount reports that tail without declaring a full fallback
Metadata comes from a private serialisation of the current native document and is cached for its content revision, including failed snapshots; notified edits invalidate it
The snapshot is limited to 64 MiB, 65536 active objects and object indexes below 65536, 4096 pages, 4096 annotations per page, 65536 annotations overall, depth 64 and 128 MiB of metadata work; decoded object streams allow 8 MiB each and 32 MiB overall
Encrypted snapshots and snapshots requested during page-object editing are unavailable; geometry requires finite nonempty rectangles, positive page dimensions and coordinates or dimensions within 1000000 points
Queries preserve the page, native focus and pending form-edit text, do not run lifecycle actions and retain no native page handles; they use the document's normal thread and callback rules
These wrapper navigation APIs do not replace the native engine's own keyboard-event Tab implementation
Order := Pdf1.FormFieldTabOrder(Status); if Length(Order) > 0 then Pdf1.FocusFormField(Order[0]);
TPdfFormTabOrderMode, TPdfFormTabOrderStatus, FocusNextFormField, FocusPreviousFormField