THotPDF.AddFacturXAssociatedFile Method

Embeds a Factur-X or ZUGFeRD invoice XML payload in a PDF/A-3 document as an Associated File and adds the matching invoice XMP metadata

Declaration

function AddFacturXAssociatedFile(const XMLBytes: TBytes; const ConformanceLevel: AnsiString; const FileName: AnsiString= 'factur-x.xml'; const Description: AnsiString= 'Factur-X invoice XML'; const Relationship: AnsiString= 'Alternative'; const Version: AnsiString= '1.0'; const CountryCode: AnsiString= ''): THPDFDictionaryObject;

Unit

HPDFDoc

Parameters

NamePurpose
XMLBytesInvoice XML bytes embedded verbatim in the PDF/A-3 EmbeddedFile stream; the XML guideline or profile identifier must match ConformanceLevel
ConformanceLevelAllowed invoice profile or conformance level, such as EN 16931, EXTENDED, XRECHNUNG, or COMFORT for ZUGFeRD 1.0
FileNameEmbedded XML filename written to /F, /UF, the EmbeddedFiles name tree, and the XMP DocumentFileName value
DescriptionOptional Filespec /Desc text shown to consuming tools
RelationshipAssociated-file relationship written as /AFRelationship and allowed by the selected invoice profile
VersionInvoice metadata version, including 1.0, 2p0, or a matching XRECHNUNG version such as 3.0
CountryCodeRegional policy code used by profile validation; use an empty value, DE, or FR

Return value

Returns the indirect Filespec dictionary registered for the primary invoice XML

Usage notes

Related APIs