function ExportXFDF(const FileName: string): Integer; overload;
function ExportXFDF(Stream: TStream): Integer; overload;
function ExportXFDFToStream(Stream: TStream): Integer;
Walks every page and creates <fields> and <annots> sections in the http://ns.adobe.com/xfdf/ namespace
Exports widget fields, hierarchical names, checkbox/radio export values and 18 annotation /Subtype values
Colours use #RRGGBB and coordinate lists use comma-separated numbers
PDFium exposes no XFDF API; the implementation is entirely Pascal in PDFiumPas
Returns the number of UTF-8 bytes written. The Stream overload writes to TStream, the FileName overload creates the file, and ExportXFDFToStream is an alias
CA and geometry are preserved although PDFium has no SetNumberValue setterImportXFDF
// Export all fields and annotations to an .xfdf file
BytesWritten := Pdf1.ExportXFDF('C:\Data\form.xfdf');
// Or to a stream
var
Stream: TFileStream;
begin
Stream := TFileStream.Create('C:\Data\form.xfdf', fmCreate);
try
Pdf1.ExportXFDF(Stream);
finally
Stream.Free;
end;
end;