Omnis PDF Device.$embedinvoicefile()
| Function group | Execute on client | Platform(s) |
|---|---|---|
| Omnis PDF Device | NO | All |
Syntax
Omnis PDF Device.$embedinvoicefile(cFilePath, iFormat[, cDocumentType='INVOICE', iProfile=kDevOmnisPDFInvoiceProfileEN16931])
Description
Embeds the invoice file in cFilePath into a PDF and marks it as an invoice according to the Factur-X or ZUGFeRD format in iFormat. It is your responsibility to ensure the electronic invoice data is compliant with the chosen format.
The parameters are as follows:
cFilePath: the file path to the invoice data to embed.
iFormat: a constant that controls the format of the PDF invoice, either: kDevOmnisPDFInvoiceFormatFacturX (a French format) or kDevOmnisPDFInvoiceFormatZUGFeRD (a German format)
The following parameters set the required metadata:
cDocumentType: the document type, which defaults to ‘INVOICE’, but can be overridden using ‘ORDER’ or ‘CREDIT NOTE’ depending on your invoicing requirements.
iProfile: a constant that controls the profile of the embedded invoice data, one of the following:
| Constant | Description |
|---|---|
| kDevOmnisPDFInvoiceProfileMinimum | ‘minimum’ standard; the minimum fields needed for a valid invoice |
| kDevOmnisPDFInvoiceProfileBasic | ‘basic’ standard; the basic fields needed for most business invoices |
| kDevOmnisPDFInvoiceProfileBasicWL | ‘basic wl’ as above, but ‘with lines’ for itemized invoices |
| kDevOmnisPDFInvoiceProfileEN16931 | ‘EN 16931’ (the default) is the primary European standard specifying the required fields for an invoice |
| kDevOmnisPDFInvoiceProfileExtended | ‘extended’ standard; the core standard with additional fields for specific industries including construction, logistics, healthcare |
| kDevOmnisPDFInvoiceProfileXRechnung | ‘XRechnung’ (X Invoice); a German standard, used when iFormat is kDevOmnisPDFInvoiceFormatZUGFeRD |