function GetFocusableAnnotationSubtypes: TPdfAnnotationSubtypes;
| Result | TPdfAnnotationSubtypes. Dynamic array of the focusable subtypes; empty when the list has been cleared |
Reads back the focus list maintained by the form fill environment — the list that governs which annotations can receive keyboard focus, and therefore what navigation calls such as FocusFormField step through
The read takes two native round trips: first the count (FPDFAnnot_GetFocusableSubtypesCount), then the values (FPDFAnnot_GetFocusableSubtypes), each decoded back into a TPdfAnnotationSubtype. When the count is zero the result is an empty array rather than an error
The call requires a loaded document and an initialised form fill environment; when forms are not initialised it raises an EPdfError with the message Form fill environment is not initialized. A failing native query raises Cannot retrieve focusable annotation subtypes. Change the list with SetFocusableAnnotationSubtypes
var
Subtypes: TPdfAnnotationSubtypes;
Subtype: TPdfAnnotationSubtype;
begin
Subtypes := Pdf1.GetFocusableAnnotationSubtypes;
for Subtype in Subtypes do
Memo1.Lines.Add(GetEnumName(TypeInfo(TPdfAnnotationSubtype),
Ord(Subtype)));
end;