You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After several attempts with mustang 2.14.2 to validate ZUGFeRD examples that use PDF/A-3A I come to the conclusion, that there is a bug in mustang's PDFValidator.
<validationfilename="zugferd_2p1_EXTENDED_Warenrechnung.pdf"datetime="2024-10-31 16:05:32">
<pdf>ValidationResult [flavour=3a, totalAssertions=63458, assertions=[], isCompliant=true]
<info>
<signature>Symtrax</signature>
<durationunit="ms">950</duration>
</info>
<messages>
<errortype="23">Not a PDF/A-3</error>
</messages>
<summarystatus="invalid"/>
</pdf>
// etc. xml part being valid
I believe I found the bug in PDFValidator.
In line 55 it defines an array of PDF_A_3_FLAVOURS, but that array contains exactly the same flavour 3 times, namely PDFAFlavour.PDFA_3_A.
In line 300 to 305 the validation is done exactly the other way round.
The error is added, because the detected PDFAFlavour is found in the array of PDF_A_3_FLAVOURS.
I believe the array should contain PDFAFlavour.PDFA_3_A, PDFAFlavour.PDFA_3_B and PDFAFlavour.PDFA_3_U.
And the validation should add the error only if the output from processorResult.getValidationResult().getPDFAFlavour() does not match any entry of PDF_A_3_FLAVOURS.
I want to try and open a pull request for this.
Thanks in advance for any feedback!
The text was updated successfully, but these errors were encountered:
melo0187
added a commit
to melo0187/mustangproject
that referenced
this issue
Oct 31, 2024
This fixes the bug where validation of actually valid PDF/A-3A files
always claimed that the PDF is "Not a PDF/A-3".
In fact, the validation was only accepting levels 3B and 3U.
After several attempts with mustang 2.14.2 to validate ZUGFeRD examples that use PDF/A-3A I come to the conclusion, that there is a bug in mustang's PDFValidator.
Take as example from ZUGFeRD/corpus the zugferd_2p1_EXTENDED_Warenrechnung.pdf E-Invoice.
The PDF part is of the PDF/A-3A flavor.
veraPDF says so, too.
verPDF XML report looks like this:
However, ZUGFeRDValidator outputs this:
I believe I found the bug in PDFValidator.
In line 55 it defines an array of PDF_A_3_FLAVOURS, but that array contains exactly the same flavour 3 times, namely
PDFAFlavour.PDFA_3_A
.In line 300 to 305 the validation is done exactly the other way round.
The error is added, because the detected PDFAFlavour is found in the array of PDF_A_3_FLAVOURS.
I believe the array should contain
PDFAFlavour.PDFA_3_A
,PDFAFlavour.PDFA_3_B
andPDFAFlavour.PDFA_3_U
.And the validation should add the error only if the output from
processorResult.getValidationResult().getPDFAFlavour()
does not match any entry of PDF_A_3_FLAVOURS.I want to try and open a pull request for this.
Thanks in advance for any feedback!
The text was updated successfully, but these errors were encountered: