Table of Contents

Method SetInvoice

Namespace
PdfSharp.Pdf.Invoicing
Assembly
PdfSharp.dll

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

xml byte[]

The UN/CEFACT Cross Industry Invoice XML, UTF-8 encoded.

profile FacturXProfile

The profile the XML conforms to.

relationship string

The 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.