THotPDF.AddPDFA3AssociatedFile Method
Adds a PDF/A-3 Associated File to the document catalog and EmbeddedFiles name tree with the requested AFRelationship
Declaration
function AddPDFA3AssociatedFile(const FileName: AnsiString; const MimeType: AnsiString; const Description: AnsiString; const Relationship: AnsiString; const FileBytes: TBytes): THPDFDictionaryObject;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FileName | Embedded filename written to Filespec /F, /UF, and the EmbeddedFiles name tree |
MimeType | RFC 2046 media type encoded as the EmbeddedFile stream /Subtype |
Description | Optional Filespec /Desc text shown by consuming tools |
Relationship | PDF/A-3 AFRelationship value such as Source, Data, Alternative, Supplement, or Unspecified |
FileBytes | Raw byte payload copied into the EmbeddedFile stream |
Return value
Returns the indirect Filespec dictionary registered for the embedded associated file
Usage notes
- Set PDFACompliance to 3A, 3B, or 3U and call BeginDoc before using this method
- The method validates FileName, MimeType, and Relationship, then writes /Params /Size, /ModDate, and /CheckSum metadata for the embedded payload
- When used after AddFacturXAssociatedFile, the attachment is still accepted with generic PDF/A-3 semantics; unsupported supporting-document MIME types are reported in FacturXWarnings instead of being rejected