Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document created with ConTeXt fails validation #1224

Closed
tarleb opened this issue Feb 2, 2022 · 2 comments
Closed

Document created with ConTeXt fails validation #1224

tarleb opened this issue Feb 2, 2022 · 2 comments

Comments

@tarleb
Copy link

tarleb commented Feb 2, 2022

Validating the file test.pdf, created with ConTeXt, yields the following error:

<validationReport profileName="PDF/A-3A validation profile" statement="PDF file is not compliant with Validation Profile requirements." isCompliant="false">
  <details passedRules="130" failedRules="1" passedChecks="1684" failedChecks="1">
    <rule specification="ISO 19005-3:2012" clause="6.6.2.3" testNumber="7" status="failed" passedChecks="0" failedChecks="1">
      <description>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.</description>
      <object>XMPProperty</object>
      <test>(isPredefinedInXMP2005 == true || isDefinedInMainPackage == true || isDefinedInCurrentPackage == true) &amp;&amp; isValueTypeCorrect == true</test>
      <check status="failed">
        <context>root/document[0]/metadata[0](15 0 obj PDMetadata)/XMPPackage[0]/Properties[2](http://purl.org/dc/elements/1.1/ - dc:description)</context>
        <errorMessage>An XMP property is either not not pre-defined, is not defined in any extension schema, or has invalid type.</errorMessage>
      </check>
    </rule>
  </details>
</validationReport>

The relevant entry in the metadata (retrieved and formatted via pdfinfo -meta test.pdf | tidy -xml -i -q)

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <rdf:Description rdf:about=""
    xmlns:dc="http://purl.org/dc/elements/1.1/">
      <dc:format>application/pdf</dc:format>
      <dc:creator>
        <rdf:Seq>
          <rdf:li xml:lang="x-default">AUTHOR</rdf:li>
        </rdf:Seq>
      </dc:creator>
      <dc:description>
        <rdf:Alt>
          <rdf:li xml:lang="x-default" />
        </rdf:Alt>
      </dc:description>
...

I don't understand the problem with this snippet. However, I'm new to the world of PDF/A, so apologies if I misunderstood something and the validation error is actually correct.

@bdoubrov
Copy link
Contributor

bdoubrov commented Feb 4, 2022

The is issue is caused by the extension schema that redefines dc:description as plain Text, while the metadata itself uses Lang Alternate, which is actually the default for the title property in Dublin Core.

Removing the redefinition of dc:title in the extension schema makes the file PDF/A compliant. I'm attaching the modified sample:
test-fixed.pdf

@bdoubrov bdoubrov closed this as completed Feb 4, 2022
@tarleb
Copy link
Author

tarleb commented Feb 4, 2022

Ah, that makes sense. Thanks for looking into this and sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants