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

Updates in 1.24 miss /AFRelationship meta info for file attachment in PDFA/3a #1385

Closed arational closed 10 months ago

arational commented 10 months ago

Validating the attached PDF with Version 1.22 doesn't report any violations. However, validating the same PDF file with Version 1.24 complains about following rule:

In order to enable identification of the relationship between the file specification dictionary and the content that is referring to it, a new (required) key has been defined and its presence (in the dictionary) is required.

https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-68-3

Looking into the PDF-Stream and the relevant line, the AFRelationship entry is present in the dictionary and sets it's value to Data.

<</UF(test.txt)/EF<</UF 10 0 R/F 10 0 R>>/AFRelationship(Data)/Desc()/Type/Filespec/F(test.txt)>>

simple.pdf

MaximPlusov commented 10 months ago

According ISO19005-3(Table E.1) the AFRelationship key should have type Name, but veraPDF allowed this key to be a name or a string. This issue was fixed in veraPDF1.24.

arational commented 10 months ago

Thanks for the quick reply! I don't have the PDF/A-3 specification by hand right now. What do you mean by type Name? How this line with /AFRelationship(Data) (see above) should look like to conform to this rule?

arational commented 10 months ago

Alright, I got it now, it should be this way: /AFRelationship/Data.

Thanks a lot for your help! I'll close this PR then, as the error is on our side.