THPDFHeadlessDocument.SaveEmbeddedFormDataFDFToFile

function SaveEmbeddedFormDataFDFToFile(const FileName: string;
  const Bytes: SysUtils.TBytes; const Selection: THPDFFDFChildSelections;
  const Fonts: THPDFHeadlessRichTextFonts;
  const AppearanceOptions: THPDFHeadlessTextAppearanceOptions;
  const FieldOptions: THPDFHeadlessFormDataOptions;
  const PackageOptions: THPDFFDFPackageOptions): THPDFHeadlessEmbeddedFDFChanges;

Selects the embedded FDF child once, applies its typed fields to an independent prepared revision and atomically publishes the PDF to FileName, equivalent to PrepareEmbeddedFormDataFDF followed by SavePreparedEmbeddedFormDataFDFToFile

The returned THPDFHeadlessEmbeddedFDFChanges reports Fields and Annotations separately; annotation-only changes still publish even when the field count is zero, and a complete no-op preserves the exact current revision bytes

Bytes must hold an embedded FDF package and Selection an explicit nonempty child path; only the selected child is decoded, and an outer package is never applied

Fonts provides the regular, bold, italic and bold-italic programs, AppearanceOptions governs the regenerated appearances, FieldOptions limits the selected child field model and PackageOptions limits the enclosing package and cumulative nested selection work

A non-nil appearance cancellation token must match the document token; a mismatched token raises hdInvalidDocument

Field permissions, certification, field locks, signature integrity and annotation policy are checked against the actual prepared destination; no field or annotation is published if the complete operation fails

A loaded destination PDF is required and the output path must be nonempty without NUL and must not alias the loaded source; the loaded document is unchanged by this save, so reload the published PDF to adopt its revision

Package selection, policy and limits · Embedded FDF transport · THPDFHeadlessDocument