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

PDF/A-3A validation: All properties specified in XMP form shall use either the predefined schemas defined in the XMP Specification #269

Closed
Intelligent2013 opened this issue Sep 4, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@Intelligent2013
Copy link
Contributor

Source issues: #264

veraPDF report:

  • root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[9](http://www.aiim.org/pdfua/ns/id/ - pdfuaid:part)
<rule specification="ISO 19005-3:2012" clause="6.6.2.3.1" testNumber="1" status="failed" 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</test>
  <check status="failed">
    <context>root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[9](http://www.aiim.org/pdfua/ns/id/ - pdfuaid:part)</context>
  </check>
</rule>
  • root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[4](http://purl.org/dc/elements/1.1/ - dc:title)
<rule specification="ISO 19005-3:2012" clause="6.6.2.3.1" testNumber="2" status="failed" failedChecks="6">
  <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>isValueTypeCorrect == true</test>
  <check status="failed">
    <context>root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[4](http://purl.org/dc/elements/1.1/ - dc:title)</context>
  </check>
</rule>
@Intelligent2013 Intelligent2013 added the bug Something isn't working label Sep 4, 2024
@Intelligent2013 Intelligent2013 self-assigned this Sep 4, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Sep 4, 2024
@Intelligent2013
Copy link
Contributor Author

Another locations:

location=Location [level=CosDocument, context=root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[4](http://purl.org/dc/elements/1.1/ - dc:title)]

location=Location [level=CosDocument, context=root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[6](http://purl.org/dc/elements/1.1/ - dc:description)]

location=Location [level=CosDocument, context=root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[7](http://purl.org/dc/elements/1.1/ - dc:creator)]

location=Location [level=CosDocument, context=root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[11](http://www.aiim.org/pdfua/ns/id/ - pdfuaid:part)]

location=Location [level=CosDocument, context=root/document[0]/metadata[0](5 0 obj PDMetadata)/XMPPackage[0]/Properties[11](http://www.aiim.org/pdfua/ns/id/ - pdfuaid:part)]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
<pdf:Keywords/>
<pdf:Producer>Ribose Metanorma mn2pdf version 1.99</pdf:Producer>
<pdf:PDFVersion>1.7</pdf:PDFVersion>
</rdf:Description>
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
<dc:format>application/pdf</dc:format>
<dc:title>Cereals and pulses — Specifications and test methods — Rice</dc:title>
<dc:language>
<rdf:Bag>
<rdf:li>en</rdf:li>
</rdf:Bag>
</dc:language>
<dc:description/>
<dc:creator>International Electrotechnical Commission; International Electrotechnical Commission; International Electrotechnical Commission; International Electrotechnical Commission</dc:creator>
<dc:date>
<rdf:Seq>
<rdf:li>2024-09-05T22:39:28+03:00</rdf:li>
</rdf:Seq>
</dc:date>
</rdf:Description>
<rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/" rdf:about="">
<pdfaid:conformance>A</pdfaid:conformance>
<pdfaid:part>3</pdfaid:part>
</rdf:Description>
<rdf:Description xmlns:pdfuaid="http://www.aiim.org/pdfua/ns/id/" rdf:about="">
<pdfuaid:part>1</pdfuaid:part>
</rdf:Description>
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
<xmp:CreatorTool/>
<xmp:MetadataDate>2024-09-05T22:39:28+03:00</xmp:MetadataDate>
<xmp:CreateDate>2024-09-05T22:39:28+03:00</xmp:CreateDate>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta><?xpacket end="r"?>

@Intelligent2013
Copy link
Contributor Author

From ISO 19005-1:2005:
image

The namespace http://purl.org/dc/elements/1.1/ for dc:title is correct. I don't figure out what's wrong. I'll deep dive into the veraPDF validation code....

@petervwyatt
Copy link

You're referring to ISO 19005-1:2005 PDF/A-1 but the spec you should be looking at is ISO 19005-3:2012 PDF/A-3 as things changed - not the least of which PDF/A-1 is for Adobe PDF 1.4 whereas PDF/A-3 is for ISO 32000-1:2008 (PDF 1.7 <-- which is not the same thing as Adobe PDF 1.7!!!)

The issue with PDF/A-1,2,3 is that it will require an XMP Extension Schema for the PDF/UA-1 XMP metadata - see clause 6.7.8 in PDF/A-1. I will see if anyone I know has a pre-baked one you can "borrow"... (to check try removing the XMP PDF/UA-1 metadata).

@petervwyatt
Copy link

Some of the PDFs (such as PDFUA-Ref-2-02_Invoice.pdf) in this test corpus are both PDF/A-2 and PDF/UA-2: https://pdfa.org/resource/pdfua-reference-suite/ so please check the metadata of that PDF. Also, LibreOffice can generate dual PDF/A and PDF/UA-1 compliant PDFs - just be sure to check the correct boxes in the options dialog.

If you blindly cut'n'paste the XMP metadata blog from PDFUA-Ref-2-02_Invoice.pdf into your PDF then validate it, it should pass.

Shameless self-promotion: if you use Adobe Acrobat, then I have developed a few XMP info panels that also might be able to help confirm things (since Acrobat will only notice a single conformance to a standard). See https://github.com/petervwyatt/AcrobatCustomPanels/

@Intelligent2013
Copy link
Contributor Author

@petervwyatt thank you for your help!
To fix this issue:

  • add
<rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" rdf:about="">
	<pdfaExtension:schemas>
		<rdf:Bag>
			<rdf:li rdf:parseType="Resource">
				<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
				<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
				<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
				<pdfaSchema:property>
					<rdf:Seq>
						<rdf:li rdf:parseType="Resource">
							<pdfaProperty:category>internal</pdfaProperty:category>
							<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
							<pdfaProperty:name>part</pdfaProperty:name>
							<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
						</rdf:li>
						<rdf:li rdf:parseType="Resource">
							<pdfaProperty:category>internal</pdfaProperty:category>
							<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
							<pdfaProperty:name>amd</pdfaProperty:name>
							<pdfaProperty:valueType>Text</pdfaProperty:valueType>
						</rdf:li>
						<rdf:li rdf:parseType="Resource">
							<pdfaProperty:category>internal</pdfaProperty:category>
							<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
							<pdfaProperty:name>corr</pdfaProperty:name>
							<pdfaProperty:valueType>Text</pdfaProperty:valueType>
						</rdf:li>
					</rdf:Seq>
				</pdfaSchema:property>
			</rdf:li>
		</rdf:Bag>
	</pdfaExtension:schemas>
</rdf:Description>
  • change from:
<dc:title>Title</dc:title>

to

<dc:title>
	<rdf:Alt>
		<rdf:li xml:lang="x-default">Title</rdf:li>
	</rdf:Alt>
</dc:title>
  • change from
<dc:creator>Author1; Author2</dc:creator>

to

<dc:creator>
	<rdf:Seq>
		<rdf:li>Author1</rdf:li>
		<rdf:li>Author2</rdf:li>
	</rdf:Seq>
</dc:creator>
  • change from
<dc:description>Text</dc:description>

to something .... (I need to find the example)
I'll change the common.xsl.

Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Sep 6, 2024
Intelligent2013 added a commit to metanorma/mn-native-pdf that referenced this issue Sep 6, 2024
@Intelligent2013
Copy link
Contributor Author

common.xsl updated in metanorma/mn-native-pdf#743

@Intelligent2013
Copy link
Contributor Author

Done.

@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Metanorma Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants