The goal was to provide the customer with electronic invoicing according to the ISDOC standard (Information System Document - a standard for electronic invoicing in the Czech Republic) into the existing internal system.
In the current process of saving invoices to PDF, an ISDOC file is generated (technically, this is an XML format). The file can be part of a PDF file (as an attachment) or as a separate file.
The biggest challenge in converting data from JSON format to XML format was ensuring the correct order of elements, as JSON does not technically guarantee the order of elements in objects.
The process now includes generating data in JSON format natively in FileMaker. Using a PHP script, it is converted to XML format and validated using an XSD file (which defines the structure and rules of the XML document). The XML file with the .ISDOC extension is used as a PDF attachment with the help of a bash script (software Ghostscript for working with PDF files). In the process of merging, the file is also checked and converted to the PDF/A-3a standard.
Used technologies
- FileMaker
- PHP
- Bash - software Ghostscript
- XML
- ISDOC