TXFAHeadlessPDFOptions

Unit: HPDFXFAHeadless

TXFAHeadlessPDFOptions = record
  PageWidth, PageHeight: Double;
  Editable: Boolean;
  CaptionFontFamilies: THPDFHeadlessRichTextFontFamilies;
  MaxInputBytes, MaxFontBytes, MaxBytes, MaxObjectBytes: Integer;
  MaxObjects, MaxPages, MaxFields, MaxGlyphs: Integer;
  CancellationToken: THPDFCancellationToken;
  ScriptOptions: TXFAFormScriptOptions;
  class function Default: TXFAHeadlessPDFOptions; static;
end;
MemberDefault and behavior
PageWidth, PageHeight595 × 842 PDF points; both must be finite and positive
EditableTrue; False sets every generated field's readOnly flag, and XFA access can independently restrict individual fields
CaptionFontFamiliesEmpty; optional named real style-font programs for Boolean and push button captions, with the original TrueTypeFont supplying the default regular face; see CaptionFontFamilies
MaxInputBytes8 MiB; XDP input length is checked before parsing
MaxFontBytes8 MiB; the original default font length and each rich caption's aggregate used style-font program bytes are checked before embedding
MaxBytes64 MiB; complete serialized candidate limit, aggregate embedded font and image streams, and individual image decoding working buffers
MaxObjectBytes16 MiB; each serialized object, appearance stream, encoded image and decoded image or alpha stream is bounded
MaxObjects100000; native indirect graph objects, including appearance and font objects; minimum six
MaxPages1000; page indices from XFA layout must fit the limit
MaxFields10000; emitted widget instances, including repeated occurrences and every radio member; a shared radio parent does not consume an extra widget slot
MaxGlyphs1000000; aggregate visible text UTF-16 code units, with a supplementary character consuming two units; a Boolean caption is counted once across all of its states, push button captions count each separately generated state, and each appearance also retains the native maximum of 65535 glyphs
CancellationTokennil; an optional caller-owned THPDFCancellationToken that is never freed by the adapter
ScriptOptionsTXFAFormScriptOptions.Default; JavaScript is disabled unless explicitly enabled and its existing execution budgets remain active

Start from Default, then lower limits or supply cancellation as required; nonpositive byte and count limits are rejected

Automatic XFA creation describes supported native consumers and the destination transaction boundary