0

A quite common method of sending invoices are sending a pdf-file through e-mail. In addition to this I would like to attach an xml-file. (Here in Finland we use xml-files for electronic invoicing). What would the correct mime-type be for this? My guess is something like:

Content-type: text/finvoice-xml

(finvoice is the name of the xml-format)

I have not been able to find any specifications for this. Any suggestions?

Håkan
  • 13
  • 6
  • Are you sending two files or one? You can wrap the PDF in xml or put the XML in the PDF. The second option is the e-invoicing way. Then you have one mimetype, either XML or PDF. – Kevin Brown Apr 30 '21 at 16:09
  • I am sending two files, a pdf-file for a visually appeasing appearance and an xml-file for easy automatic parsing. The idea of wrapping the pdf into the xml (with base64 encoding?) is interesting, but the finvoice 3.0 standard does not support this. Here you can find the standard, in case that is of interest to you: https://file.finanssiala.fi/finvoice/Finvoice_3_0_implementation_guidelines.pdf – Håkan May 06 '21 at 14:14

1 Answers1

0

There's Python software for wrapping an xml file into a pdf file in the approved manner. It also validates your attempts at xml against the standard.

pip show factur-x

Name: factur-x
Version: 2.3
Summary: Factur-X and Order-X: electronic invoicing and ordering standards
Home-page: https://github.com/akretion/factur-x
Author: Alexis de Lattre
Author-email: alexis.delattre@akretion.com
License: BSD
Location: /home/nigel/.virtualenvs/sarah/lib/python3.7/site-packages
Requires: PyPDF4, lxml

Hope this is helpful information.

nigel222
  • 7,582
  • 1
  • 14
  • 22