Wiki source code of XMLToFacturX
Last modified by Outhman Moustaghfir on 2022/06/13 13:18
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
10.1 | 1 | |
![]() |
1.2 | 2 | |
![]() |
5.2 | 3 | = Introduction = |
![]() |
1.2 | 4 | |
![]() |
5.2 | 5 | This document aims to give a global view on how to create a FacturX, a PDF-based format for electronic invoices, by using the XMLToFacturX connector. |
![]() |
1.2 | 6 | |
![]() |
5.2 | 7 | = Parameters = |
![]() |
1.2 | 8 | |
9 | XMLToFacturX requires 3 parameters : | ||
10 | |||
11 | * **Output FileName** : the folder and the name of the output FacturX, eg: '/out/facturX.pdf' , '/work/newFacturX.pdf' ... | ||
![]() |
11.1 | 12 | ** __//NB//:__ putting the output FacturX in the "out" directory, allows to show and download from the exploitation page. |
![]() |
1.2 | 13 | * **Input Charset**: the charset used for the input file. set by default to UTF-8. |
14 | * **Output Charset: **the charset used for the output file. set by default to UTF-8. | ||
15 | |||
16 | = Use case = | ||
17 | |||
![]() |
6.2 | 18 | To use the XMLToFacturX correctly, it must be preceded by a gateway (__**inclusive or parallel**__) that links it to another 2, and only 2 connectors, one generates an XML file structure, and the other sends its invoice in PDF format, and that is to ensure having both files before triggering XMLToFacturX connector. |
![]() |
1.2 | 19 | |
![]() |
2.1 | 20 | let's take a simple example to understand the functionality of the connector : |
21 | |||
![]() |
6.2 | 22 | [[image:2022-03-14_15h45_38.png||height="250" width="571"]] [[image:2022-03-14_15h40_46.png||height="249" width="265"]] |
![]() |
2.1 | 23 | |
24 | |||
![]() |
6.7 | 25 | Here, we have created a simple scenario that load 2 files using the **LoadFile **connector after starting the process with an AppEventListener : |
![]() |
2.1 | 26 | |
![]() |
6.5 | 27 | * __LoadFile1__ loads an XML file named 'facturx.xml'. |
28 | * __LoadFile2__ loads a PDF File named 'Invoice.pdf'. | ||
![]() |
2.1 | 29 | |
![]() |
6.7 | 30 | As already mentioned, the next connector must be a gateway, in this case, we have called an inclusive gateway. After loading both files successfully, the process can trigger the XMLToFacturX connector. |
![]() |
6.5 | 31 | |
![]() |
9.1 | 32 | Now, we can observe the difference by opening the output file on __Adobe Acrobat Reader__, by just clicking on the paperclip symbol to see the embedded XML structure. |
![]() |
6.6 | 33 | |
![]() |
6.7 | 34 | |
![]() |
9.1 | 35 | [[image:2022-03-14_16h17_40.png||height="436" width="930"]] |
![]() |
6.8 | 36 | |
![]() |
9.1 | 37 | |
38 |