Method SetInvoice
SetInvoice(byte[], FacturXProfile, string?)
Embeds the invoice XML and declares the document a Factur-X invoice of the specified profile. Call it before adding pages unless a PDF/A-3 format is already set: without one, the document becomes PDF/A-3B, and FreePDF sets PDF/A formats only before content exists.
public void SetInvoice(byte[] xml, FacturXProfile profile, string? relationship = null)
Parameters
xmlbyte[]The UN/CEFACT Cross Industry Invoice XML, UTF-8 encoded.
profileFacturXProfileThe profile the XML conforms to.
relationshipstringThe associated-file relationship (see PdfAFRelationship). By default Data for MINIMUM and BASIC WL and Alternative for the other profiles; national rules may ask for Source or Data instead.