Headless FDF field flags

The headless FDF interchange profile carries Ff, SetFf and ClrFf through the existing form-data import and export APIs, including flags-only requests and nonterminal parent targets

Exact masks and request order

A non-null Ff replaces the complete mask and takes precedence over the other operands; otherwise SetFf is applied before ClrFf

Wire operands accept exact lexical integers in the signed 32-bit or unsigned 32-bit range; a real token such as 2.0 is rejected even when its mathematical value is integral

Null operands are absent, numeric zero is explicit, and repeated FDF entries are applied in input order

Reserved bits are preserved as opaque mask bits without assigning additional field behavior

Public native records

THPDFHeadlessFormDataField adds HasFlags/Flags, HasSetFlags/SetFlags and HasClearFlags/ClearFlags, with Cardinal mask values

Initialize the entire record with Default(THPDFHeadlessFormDataField) before assigning members, and rebuild native consumers and generated C++ headers for the expanded record

The loaded field information retains its existing signed Integer representation of the same 32 bits

Inheritance and appearance

An absent or null local Ff inherits the nearest numeric ancestor mask; an explicit local zero overrides it

Parent changes update affected descendant caches and appearances while preserving each child dictionary's absent, null or explicit local flag state

Flags-only appearance refresh also preserves absent, null and explicit local V, I and RV entries, so inherited values and selections are not replaced by local shadows

For appearance refresh, a null rich payload uses the existing plain-value fallback without replacing the local null entry; inherited button state is used consistently for appearance selection and FDF export

Values and appearances are validated against the final mask, including multiselect choice arrays and password rendering; appearance regeneration uses caller-supplied font data

Typed rich-text updates preserve an explicitly requested final mask instead of silently adding the RichText bit

Authority and publication

Read-only authority is captured at import start, so clearing a parent or field bit cannot authorize a later value change to an originally read-only terminal field

A flags-only real change uses the existing structural and field-modification policies; requests containing values retain the existing filling permissions

ImportFormDataToFile publishes an isolated candidate and preserves the source object, including unsaved edits; a later failure preserves the destination and allows a fresh retry on the same owner

Changed counts identify distinct FDF target dictionaries that changed during ordered processing; a parent is counted once even when several descendant appearances are refreshed

A genuine no-op preserves the original bytes and does not manufacture a local flag override

Transport boundary

The transport is the FDF payload of the existing forms.import and forms.export operations; versioned C ABI records and calling conventions stay unchanged

Direct JSON forms.fill flag members and XFDF flag operands are outside this profile

The optional fourth HPDFParserParseSimpleDictionaryWithStatistics argument preserves numeric source tokens for the explicit FDF parser path; existing callers retain the default parser behavior

FDF text encodings

FDF text strings recognize UTF-16BE, UTF-16LE and UTF-8 byte-order markers by their exact bytes, preserving Unicode field names and values during export and reimport

Malformed Unicode sequences remain rejected, and the original PDFDocEncoding fallback is retained when no marker is present

Binary authentication and API scope

Authenticated R5 and R6 permission blocks validate their fixed sentinel and marker bytes without codepage-sensitive string comparison, while the metadata Boolean and permission-mask agreement checks remain strict

A binary AnsiString slice can have the same bytes as a literal and still compare unequal after codepage-aware text conversion; binary BOM and permission markers therefore use guarded byte comparisons

The nonterminal parent-target profile on this page belongs to the headless form-data APIs; native THotPDF nonterminal FDF flag targets remain outside this completed profile

Existing native THotPDF terminal field-mask interchange and its original transaction behavior remain separate

Reproducible controls

The public native suite exercises thirty-one cases, 1000 native checks and 750 independent PDF checks over thirty-six outputs, with explicit caller fonts and fresh output directories

The separate text-codec suite retains twenty authored vectors and an actual 519-byte self-export, with twenty-one native cases, 157 native checks and 257 independent readback checks

Windows FPC codec builds use the explicit NoGUI Interfaces bootstrap counterpart; original and actual program digests are recorded separately

The separate permission-authentication suite checks twenty-eight cases with 300 native and 284 independent readback assertions on the five tested targets

Linux transport and credential-policy matrices, four-target Windows adapters, and fresh combined DocMDP/FieldMDP signing retain their separate acceptance identities

Acceptance identities must name the actual compiler, operating system, source composition and receipt; package compile/link checks and transport checks are recorded separately