mustangproject icon indicating copy to clipboard operation
mustangproject copied to clipboard

pdf/A-1b falsely invalid ?

Open obonnefon opened this issue 3 years ago • 5 comments

Hello, here's a file considered by VeraPdf as a valid Pdf/A-1 but rejected by Mustang when trying to combine with xml file. (a pb of embedded font - Calibri) juin 22, 2021 8:23:07 AM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap AVERTISSEMENT: Invalid ToUnicode CMap in font SVFUWB+Calibri,Bold juin 22, 2021 8:23:07 AM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap AVERTISSEMENT: Invalid ToUnicode CMap in font CUMZOI+Calibri juin 22, 2021 8:23:07 AM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap AVERTISSEMENT: Invalid ToUnicode CMap in font SVFUWB+Calibri,Bold juin 22, 2021 8:23:07 AM org.apache.pdfbox.pdmodel.font.PDFont loadUnicodeCmap AVERTISSEMENT: Invalid ToUnicode CMap in font CUMZOI+Calibri 08:23:07.383 [main] ERROR o.mustangproject.validator.Validator - File is not a valid PDF/A input file java.io.IOException: File is not a valid PDF/A input file at org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA1.ensurePDFIsValid(ZUGFeRDExporterFromA1.java:81) at org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA3.load(ZUGFeRDExporterFromA3.java:121) at org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA1.load(ZUGFeRDExporterFromA1.java:92) at org.mustangproject.commandline.Main.performCombine(Main.java:648) at org.mustangproject.commandline.Main.main(Main.java:403)

invoice.pdf

Thanks

obonnefon avatar Jun 22 '21 06:06 obonnefon

Hi, as prevalidation Mustang uses the validation of PDFBox, you should be able to ignore that using ZUGFeRDExporter.ignoreA1Errors()

kind regards Jochen

jstaerk avatar Jun 22 '21 11:06 jstaerk

I came across this issue and what might be useful for someone else encountering this problem using the CLI version: You can use the equivalent cli argument [-i, --ignorefileextension] which "Check for all files (.) instead of PDF files only (*.pdf) in metrics, ignore PDF/A input file errors in combine".

amacado avatar Nov 30 '21 17:11 amacado

Is there anything wrong with Mustang, is it wrong in the file or is it wrong by PDFbox to report that?

jstaerk avatar Dec 06 '21 12:12 jstaerk

see also #164 and #139

jstaerk avatar Dec 08 '21 19:12 jstaerk

FYI I've also gotten the File is not a valid PDF/A-1 input file error with Mustang-CLI 2.8.0, with files generated as PDF-A/1 from GhostScript and from ocrmypdf.

moritz avatar Nov 27 '23 13:11 moritz