I'm trying to sign with IText 8 a PDF a PDF/A-3B document. My code seem to work, but I didn't succeed with online validator. The error I get with various site is:
Specification: ISO 19005-3:2012, Clause: 6.6.2.3, Test number: 7
All properties specified in XMP form shall use either the predefined schemas defined in the XMP Specification, ISO 19005-1 or this part of ISO 19005, or any extension schemas that comply with 6.6.2.3.2. Failed
1 occurrences Hide
XMPProperty
(isPredefinedInXMP2005 == true || isDefinedInMainPackage == true || isDefinedInCurrentPackage == true) && isValueTypeCorrect == true
root/document[0]/metadata[0](23 0 obj PDMetadata)/XMPPackage[0]/Properties[7](http://ns.adobe.com/pdf/1.3/ - pdf:Trapped)
The original document was validated from VerPDF's site meanwhile the result pdf with or without the signin process fail in this way.
My simple code without sign
PdfDocument pdfDoc = new PdfDocument(new PdfReader(pdfInputFileName), new PdfWriter(pdfOutputFileName));
pdfDoc.close()
The output is without Signature for privacy reason
Any thoughts? Thanks in advance
I've tryied to add writer xmpMetadata but no changes in the result
I believe this is a bug in VeraPDF. The reason why the check fails is that iText (correctly, as far as I'm aware) copies the value of the Trapped entry in the input PDF's info dict into the
pdf:TrappedXMP property when rewriting the file, butpdf:Trappedis not in this namespace listing in VeraPDF: https://github.com/veraPDF/veraPDF-library/blob/153e1723da4ea20176b4efe65e176e11e5[…]ore/src/main/java/org/verapdf/model/tools/xmp/XMPConstants.java. AFAIK it should be in there, though (reference: https://developer.adobe.com/xmp/docs/XMPNamespaces/pdf/).This also has implications for files that claim conformance with both PDF/X-4 and PDF/A-2 or PDF/A-3, since the
pdf:Trappedproperty is mandatory in such files.