0

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 original file

The output

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

1 Answers1

2

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:Trapped XMP property when rewriting the file, but pdf:Trapped is 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:Trapped property is mandatory in such files.

mval
  • 295
  • 2
  • 10
  • I'm not sure because every validator online tells that the first file is valida PDF A/3B and the second no. VeraPDF is a bit more detailed but other validator give the same result. – Andrea Carlo Ponte Jun 08 '23 at 13:13
  • Hi, I went and got a second opinion from a PDF/A expert that also worked on VeraPDF. His position is that the Trapped property is not part of the 2005 XMP specification (although it was added to the namespace at some unspecified later point in time, and the corresponding PDF property predates XMP by half a decade). Nonetheless, PDF/X-4 is based on the same pre-ISO XMP spec, and is also older than PDF/A. Regardless of whether the omission from PDF/A was intentional or not, this seems to be a bit more thorny than I thought. To be continued... – mval Jun 09 '23 at 19:34