akretion / factur-x

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

PDF A-1 as input? #1

Closed jstaerk closed 1 year ago

jstaerk commented 6 years ago

Silly question, is it OK to use PDF/A-1 as input? I used http://www.mustangproject.org/MustangGnuaccountingBeispielRE-20170509_506blanko.pdf as a basis but https://www.pdf-online.com/osa/validate.aspx complained on the resulting python-factur-x.pdf

Validating file "python-factur-x.pdf" for conformance level pdfa-3b

The 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.

XMP packet header missing.

XMP packet trailer missing.

A device-specific color space (DeviceRGB) without an appropriate output intent is used.

File specification 'factur-x.xml' not associated with an object.

The document does not conform to the requested standard.

The file format (header, trailer, objects, xref, streams) is corrupted.

The document doesn't conform to the PDF reference (missing required entries, wrong value types, etc.).

The document contains device-specific color spaces.

The document's meta data is either missing or inconsistent or corrupt.

The document does not conform to the PDF/A-3b standard.
Cheberli commented 2 years ago

Hi, Did you find a solution to this problem ? I am facing the same problem here ! I used this site https://services.fnfe-mpe.org/ to validate my files.

Spec. ISO_19005_3 clause 6.2.4.3 test 2 PDF/A-3 error : 
DeviceRGB shall only be used if a device independent DefaultRGB colour space has been set when the DeviceRGB colour space is used, or if the file has a PDF/A OutputIntent that contains an RGB destination profile.

Spec. ISO_19005_3 clause 6.2.11.5 test 1 PDF/A-3 error
For every font embedded in a conforming file and used for rendering, the glyph width information in the font dictionary and in the embedded font program shall be consistent.

Spec. ISO_19005_3 clause 6.1.3 test 1 PDF/A-3 error
The file trailer dictionary shall contain the ID keyword whose value shall be File Identifiers as defined in ISO 32000-1:2008, 14.4

Thanks !

Juli4nSc commented 1 year ago

Hello, did you find any solution to this ? Struggling on the same problem :/

alexis-via commented 1 year ago

You should check that the PDF file you give as input is PDF/A. The lib cannot output a PDF/A3 if the input is not a PDF/A file.