HPDFEncodeHeadlessFormData
A nonempty RichText field is validated with the bounded native XHTML decoder and written as FDF RV or XFDF value-richtext; rich values require one scalar text value
function HPDFEncodeHeadlessFormData(const Fields: THPDFHeadlessFormDataFields;
Format: THPDFHeadlessFormDataFormat;
const Options: THPDFHeadlessFormDataOptions): SysUtils.TBytes;
Validates an independently owned model and returns actual bounded FDF 1.2 or UTF-8 XFDF bytes
Qualified FDF names form a nested Kids hierarchy; XFDF output uses qualified names directly in field attributes
FDF preserves byte-name values with hexadecimal name escapes and text arrays including empty arrays; XFDF represents name values as UTF-8 text and empty arrays with one empty value element
Names must be nonempty, contain no NUL and remain unique; scalar text requires one value, name-only and byte-name entries cannot carry text arrays, and all Unicode strings must have valid surrogate pairs
Output byte limits are checked during emission, and model objects, FDF hierarchy nodes and serialized depth are bounded before excessive allocation
EHPDFHeadlessFormDataError reports invalid models or budgets; EHPDFOperationCancelled reports cancellation