THPDFHeadlessDocument.GetChoiceFieldValues

THPDFHeadlessChoiceValues = array of UnicodeString;
function GetChoiceFieldValues(FieldIndex: Integer): THPDFHeadlessChoiceValues;

Returns all selected export strings from a Ch field, resolving inherited V within the document depth and cycle limits

A string V becomes one array element, an array V retains its stored order, and a missing or null V returns an empty array

Malformed value types, nonstring array elements, exhausted selection or byte budgets, cancellation, and a nonchoice field raise a document diagnostic

The returned dynamic array belongs to the caller and remains usable after the document closes

Use SetChoiceFieldValuesWithAppearance to update values, indices, and widget appearances together