konik-io / konik

A library to create, read and validate ZUGFeRD compliant invoices. Available for Java and .NET
https://konik.io
Other
48 stars 19 forks source link

Validation Error #56

Closed horstoeko closed 5 years ago

horstoeko commented 6 years ago

Hello,

i'm using iTextSharp to produce a ZUGFeRD compatible PDF document. I am only using the validator from the konik library. The validator cannot find a file inside the produced document. It throws "The PDF does not contain an attached file named ZUGFeRD-invoice.xml". I can't see any mistake done by myself, so i think there is a validor bug.

This is the file: 1432gmtx.yxt.pdf

Vad1mo commented 6 years ago

thx, for the report, however the pdf doesn't seem to be PDF/A compliant nor ZUGFeRD compliant.

I suspect you should attach a file and not an ASCII Stream.

Check chapter 7.4 of the spec.

image

image

horstoeko commented 6 years ago

So far, I thank you for your support. I will check this. Thanks a lot

disl commented 6 years ago

I have the same problem. Although my ZUGFeRD file is valid (https://www.din-zugferd-validation.org), "handler.extractInvoice()" function displays the same error message. invoice.pdf (Comfort 1.0) invoice.pdf

Vad1mo commented 6 years ago

@disl could you post your file and sample code?

disl commented 6 years ago

File you can see above (link) and download. I also use classic iText library.

Vad1mo commented 6 years ago

So far there is an XMP error, image

However I need to check if it impacts the extraction of the xml from the pdf.

disl commented 6 years ago

Thank you. I'll be waiting for your answer.

Vad1mo commented 6 years ago

@disl the PDF is not ZUGFeRD compliant compare the internal PDF Structure of your file with the reference.

image

We can adapt our lib to deal with that case, but this won't change anything in general as they are various different implementations.

disl commented 6 years ago

The only thing I don't understand - why file passes ZUGFeRD - test, or test methods at test are outdated or not corrected? How and where do I have to test my files?

Vad1mo commented 6 years ago

image

Vad1mo commented 6 years ago

I suspect they just search for a file named ZUGFeRD-invoice.xml (maybe even any file) in the attachment and take it.

https://www.din-zugferd-validation.org is not the official validation service as there isn't any.

However you should make sure you invoice is ZUGFeRD Compliant.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.