Invoice Automation / Factur-X

Generate PDF Invoices with Carbone

Download Template

Download data sample

  • Template type document docx simple
  • Carbone min. v4.0.0+
  • Features factur-X
  • Target invoice contract custom

Objectives

Create a Factur-X invoice with the following feature:

  • Attach an XML-file to the generated invoice.

Solution

Once the invoice template is ready, follow these steps to generate a Factur-X document with Carbone:

  1. Generate the XML file to attach to the Factur-X invoice:

    • You can create this XML file manually.
    • Alternatively, you can use Carbone (with a template.xml)
  1. Use the :attachFile formatter

    To generate a file compliant with the Factur-X standard, you must use the :attachFile('factur-x.xml') formatter, specifically with factur-x.xml as the first parameter. It automatically detects the Conformance Level from the attached XML ('MINIMUM', 'BASIC WL', 'BASIC', 'EXTENDED', 'EN 16931') and adjusts the PDF metadata accordingly. Additionally, it sets SelectPdfVersion = 3 (PDF Version 3B) by default if not specified and if the output file is a PDF.

    Note: Add a type parameter to the :attachFile(filename, type) formatter to specify the PDF AFRelationship. Options for type include: "Source", "Data" (default), "Alternative", "Supplement", "Unspecified", "FormData", and "Schema".

And there you go!


   1- Template                                            
  ┌─────────────────┐                                     
  │   *.docx        │       ┌─────────┐                   
  │                 ┼───┐   │         │                   
  │ :attachFile     │   │   │         │                   
  │ ('factur-x.xml')│   └───►         │     Export        
  └─────────────────┘       │ Carbone │    ┌───────┐      
                            │         │    │ *.pdf │      
             2- Data    ┌───►         ┼────►     ┌─┴┐     
            ┌───────┐   │   │         │    │     │┌┐│     
            │*.json ┼───┘   │         │    └─────┤│││     
            └───────┘     ┌─►         │          │ │      
                          │ │         │          └─┘*.xml 
             3- XML       │ │         │                   
            ┌───────┐     │ └─────────┘                   
            │*.xml  ┼─────┘                               
            └───────┘                                                                   

You might also like

Trusted by 600+ paid customers in 40+ countries

Finance
Healthcare
Public
Retail
Industries
Energy
Software
Telecom
1dior.png
22thales.png
23younited.png
2danfoss.png
3cma-cgm.png
3illumina.svg
4KparK.png
6scalingo.png
7defense.png
8bmw.png
8telus.png
bestseller.png
flagship_bioscience.png
insly.png
ninox.png
sodexo.png