akretion / factur-x

Python lib for Factur-X, the e-invoicing standard for France and Germany
Other
156 stars 56 forks source link

PDF file read mode #4

Closed m3nu closed 1 year ago

m3nu commented 6 years ago

Tried to read one of the test files and it failed.

manu@nyx2: ~/Downloads $ facturx-pdfextractxml factur-x/zugferd10/Beispiele/zugferd_example_invoice_en.pdf test.xml
PdfReadWarning: PdfFileReader stream/file object is not in binary mode. It may not be read correctly. [pdf.py:1079]
2018-05-08 15:10:21,938 [INFO] Returning an XML file False
2018-05-08 15:10:21,938 [WARNING] File test.xml has not been created

It did work when doing it step-by-step in iPython. So I guess the readmode isn't set somewhere. Will prepare a PR.

grynn-in commented 3 years ago

I found similar errors. I also found that the PDF created after adding the XML has issues as per this tool. https://www.pdf-online.com/osa/validate.aspx

Errors:

File | ACC-SINV-2021-00024.pdf -- | -- Compliance | pdfa-3b Result | Document does not conform to PDF/A. Details | Validating file "ACC-SINV-2021-00024.pdf" for conformance level pdfa-3bThe file header format does not conform to the standard.The comment, classifying the file as containing 8-bit binary data, is missing.The file trailer dictionary must have an id key.A device-specific color space (DeviceRGB) without an appropriate output intent is used.The width for character 1 in font 'OpenSans-Bold' does not match.The width for character 2 in font 'OpenSans-Bold' does not match.The width for character 3 in font 'OpenSans-Bold' does not match.The width for character 4 in font 'OpenSans-Bold' does not match.The width for character 5 in font 'OpenSans-Bold' does not match.The width for character 6 in font 'OpenSans-Bold' does not match.The width for character 7 in font 'OpenSans-Bold' does not match.The width for character 8 in font 'OpenSans-Bold' does not match.The width for character 9 in font 'OpenSans-Bold' does not match.The width for character 10 in font 'OpenSans-Bold' does not match.The width for character 11 in font 'OpenSans-Bold' does not match.The width for character 12 in font 'OpenSans-Bold' does not match.The width for character 13 in font 'OpenSans-Bold' does not match.The width for character 14 in font 'OpenSans-Bold' does not match.The width for character 15 in font 'OpenSans-Bold' does not match.The width for character 16 in font 'OpenSans-Bold' does not match.The width for character 17 in font 'OpenSans-Bold' does not match.The width for character 18 in font 'OpenSans-Bold' does not match.The width for character 19 in font 'OpenSans-Bold' does not match.The width for character 20 in font 'OpenSans-Bold' does not match.The width for character 21 in font 'OpenSans-Bold' does not match.The width for character 22 in font 'OpenSans-Bold' does not match.The width for character 23 in font 'OpenSans-Bold' does not match.The width for character 24 in font 'OpenSans-Bold' does not match.The width for character 25 in font 'OpenSans-Bold' does not match.The width for character 26 in font 'OpenSans-Bold' does not match.The width for character 27 in font 'OpenSans-Bold' does not match.The width for character 28 in font 'OpenSans-Bold' does not match.The width for character 29 in font 'OpenSans-Bold' does not match.The width for character 30 in font 'OpenSans-Bold' does not match.The width for character 31 in font 'OpenSans-Bold' does not match.The width for character 32 in font 'OpenSans-Bold' does not match.The width for character 33 in font 'OpenSans-Bold' does not match.The width for character 34 in font 'OpenSans-Bold' does not match.The width for character 35 in font 'OpenSans-Bold' does not match.The width for character 36 in font 'OpenSans-Bold' does not match.The width for character 37 in font 'OpenSans-Bold' does not match.The width for character 38 in font 'OpenSans-Bold' does not match.The width for character 39 in font 'OpenSans-Bold' does not match.The width for character 40 in font 'OpenSans-Bold' does not match.The width for character 41 in font 'OpenSans-Bold' does not match.The width for character 42 in font 'OpenSans-Bold' does not match.The width for character 43 in font 'OpenSans-Bold' does not match.The width for character 44 in font 'OpenSans-Bold' does not match.The width for character 45 in font 'OpenSans-Bold' does not match.The width for character 46 in font 'OpenSans-Bold' does not match.The width for character 47 in font 'OpenSans-Bold' does not match.The width for character 48 in font 'OpenSans-Bold' does not match.The width for character 49 in font 'OpenSans-Bold' does not match.The width for character 50 in font 'OpenSans-Bold' does not match.The width for character 51 in font 'OpenSans-Bold' does not match.The width for character 1 in font 'OpenSans' does not match.The width for character 2 in font 'OpenSans' does not match.The width for character 3 in font 'OpenSans' does not match.The width for character 4 in font 'OpenSans' does not match.The width for character 5 in font 'OpenSans' does not match.The width for character 6 in font 'OpenSans' does not match.The width for character 7 in font 'OpenSans' does not match.The width for character 8 in font 'OpenSans' does not match.The width for character 9 in font 'OpenSans' does not match.The width for character 10 in font 'OpenSans' does not match.The width for character 11 in font 'OpenSans' does not match.The width for character 12 in font 'OpenSans' does not match.The width for character 13 in font 'OpenSans' does not match.The width for character 14 in font 'OpenSans' does not match.The width for character 15 in font 'OpenSans' does not match.The width for character 16 in font 'OpenSans' does not match.The width for character 17 in font 'OpenSans' does not match.The width for character 18 in font 'OpenSans' does not match.The width for character 19 in font 'OpenSans' does not match.The width for character 20 in font 'OpenSans' does not match.The width for character 21 in font 'OpenSans' does not match.The width for character 22 in font 'OpenSans' does not match.The width for character 23 in font 'OpenSans' does not match.The width for character 24 in font 'OpenSans' does not match.The width for character 25 in font 'OpenSans' does not match.The width for character 26 in font 'OpenSans' does not match.The width for character 27 in font 'OpenSans' does not match.The width for character 28 in font 'OpenSans' does not match.The width for character 29 in font 'OpenSans' does not match.The width for character 30 in font 'OpenSans' does not match.The width for character 31 in font 'OpenSans' does not match.The width for character 32 in font 'OpenSans' does not match.The width for character 33 in font 'OpenSans' does not match.The width for character 34 in font 'OpenSans' does not match.The width for character 35 in font 'OpenSans' does not match.The width for character 36 in font 'OpenSans' does not match.The width for character 37 in font 'OpenSans' does not match.The width for character 38 in font 'OpenSans' does not match.The width for character 39 in font 'OpenSans' does not match.The width for character 40 in font 'OpenSans' does not match.The width for character 41 in font 'OpenSans' does not match.The width for character 42 in font 'OpenSans' does not match.The width for character 43 in font 'OpenSans' does not match.The width for character 44 in font 'OpenSans' does not match.The width for character 45 in font 'OpenSans' does not match.The width for character 46 in font 'OpenSans' does not match.The width for character 47 in font 'OpenSans' does not match.The width for character 48 in font 'OpenSans' does not match.The width for character 49 in font 'OpenSans' does not match.The width for character 50 in font 'OpenSans' does not match.The width for character 51 in font 'OpenSans' does not match.The width for character 52 in font 'OpenSans' does not match.The width for character 53 in font 'OpenSans' does not match.The width for character 54 in font 'OpenSans' does not match.The width for character 55 in font 'OpenSans' does not match.The width for character 56 in font 'OpenSans' does not match. The document does not conform to the requested standard. The file format (header, trailer, objects, xref, streams) is corrupted. The document contains device-specific color spaces.The document contains fonts without embedded font programs or encoding information (CMAPs). The document's meta data is either missing or inconsistent or corrupt.The document does not conform to the PDF/A-3b standard.
alexis-via commented 1 year ago

I think the initial bug has been fixed in previous releases. If it's not the case, please re-open.