function SaveAsWithAssociateFiles(const FileName: string; const Options: TAssocFilesOptions): Boolean;
| FileName | string. The target output file path |
| Options | TAssocFilesOptions. Injection options detailing files, metadata, and the target catalog or page attachment point |
True if the PDF with injected associate files was successfully saved, or False on failureSaveAsWithAssociateFiles implementeert PDF 2.0 Associate Files-injectie (ISO 32000-2 §7.11.4)
De methode koppelt bestanden zoals XML-gegevens, bronschema's of sjablonen aan de catalogus of afzonderlijke pagina's met expliciete /AFRelationship-metadata
TAssociateFile.Description schrijft de menselijk leesbare bestandsspecificatie-/Desc-waarde die door toegankelijkheids- en discovery-workflows wordt gebruikt
saRemoveSecurity)TAssocFilesOptions structure, specifying filenames, content arrays, MIME types, and relationships
var
Opts: TAssocFilesOptions;
F: TAssociateFile;
begin
Opts := TAssocFilesOptions.Default;
Opts.TargetPage := 0; // catalog-level attachment
F.FileName := 'data.xml';
F.Content := GetXmlBytes;
F.Relationship := afData;
F.MIMEType := 'text/xml';
SetLength(Opts.Files, 1);
Opts.Files[0] := F;
if Pdf1.SaveAsWithAssociateFiles('output.pdf', Opts) then
ShowMessage('PDF with associate files saved successfully');
end;