veraPDF / veraPDF-library

Industry supported, open source PDF/A validation library
http://verapdf.org/software
GNU General Public License v3.0
270 stars 48 forks source link

Validation of PDF files created with OpenPDF #1384

Closed andreasrosdal closed 10 months ago

andreasrosdal commented 10 months ago

Hello! I would like to begin using veraPDF validator to validate the PDF files created by OpenPDF in some unit tests. I have started documenting the progress here: https://github.com/LibrePDF/OpenPDF/issues/980

May I have some advice about how to alter this unit test so that the PDF file created by OpenPDF is validated as compliant by veraPDF?

bdoubrov commented 10 months ago

@andreasrosdal checking the errors reported in the comment https://github.com/LibrePDF/OpenPDF/issues/980#issuecomment-1790722685, I see that these errors are accompanied with the descriptions. You can also check our wiki to fine more information on them: https://github.com/veraPDF/veraPDF-validation-profiles/wiki

But most importantly the error

TestAssertion [ruleId=RuleId [specification=ISO 19005-1:2005, clause=6.7.2, testNumber=1], status=failed, message=The document catalog dictionary of a conforming file shall contain the Metadata key., location=Location [level=CosDocument, context=root/document[0]], locationContext=null, errorMessage=null]

indicates that the PDF files you test do not contain XMP metadata and most likely are not aimed to be PDF/A compliant. As any PDF/A file is required to have XMP metadata.

I note that veraPDF is a PDF/A or PDF/UA validator. It does also support validation against Arlington model, which is a completely different set of validation rules. I think first of all you need to decide against which specification you'd like to check your files.