Skip to content

Commit

Permalink
Update PDF/UA-2 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov authored and bdoubrov committed Dec 22, 2023
1 parent 79b1187 commit 3f69e7f
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 15 deletions.
23 changes: 23 additions & 0 deletions PDF_UA/2/8.10 Forms/8.10.1 General/verapdf-profile-8-10-1-t03.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFUA_2">
<details creator="veraPDF Consortium" created="2023-03-13T10:53:06.894+03:00">
<name>ISO 14289-2:202x - 8.10 Forms - 8.10.1 General - XFA form</name>
<description>XFA forms shall not be present</description>
</details>
<hash></hash>
<rules>
<rule object="PDAcroForm">
<id specification="ISO_14289_2" clause="8.10.1" testNumber="3"/>
<description>XFA forms shall not be present</description>
<test>containsXFA == false</test>
<error>
<message>XFA form is present</message>
<arguments/>
</error>
<references>
<reference specification="ISO 32000-2:2020" clause="Annex K"/>
</references>
</rule>
</rules>
<variables/>
</profile>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFUA_2">
<details creator="veraPDF Consortium" created="2023-03-13T10:53:06.894+03:00">
<name>ISO 14289-2:202x - 8.10 Forms - 8.10.2.3 Contents entry - AA and Contents</name>
<description>If an additional action (AA) entry is present in a widget annotation dictionary, the respective
widget's Contents entry shall be present</description>
</details>
<hash></hash>
<rules>
<rule object="PDWidgetAnnot">
<id specification="ISO_14289_2" clause="8.10.2.3" testNumber="2"/>
<description>If an additional action (AA) entry is present in a widget annotation dictionary, the respective
widget's Contents entry shall be present</description>
<test>containsAA == false || Contents != null</test>
<error>
<message>Widget annotation dictionary contains an AA entry, but not contains the Contents entry</message>
<arguments/>
</error>
<references>
<reference specification="ISO 32000-2:2020" clause="Table 191"/>
</references>
</rule>
</rules>
<variables/>
</profile>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
<argument>V</argument>
</arguments>
</error>
<references/>
<references>
<reference specification="ISO 32000-2:2020" clause="Table 226"/>
<reference specification="ISO 32000-2:2020" clause="Table 228"/>
</references>
</rule>
</rules>
<variables/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
<message>The document contains a reference to the .notdef glyph</message>
<arguments/>
</error>
<references/>
<references>
<reference specification="ISO 32000-2:2020" clause="9.7.6.3"/>
</references>
</rule>
</rules>
<variables/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFUA_2">
<details creator="veraPDF Consortium" created="2023-03-13T10:53:06.894+03:00">
<name>ISO 14289-2:202x - 8.9 Annotations - 8.9.2.4 Annotation types - File attachment annotation</name>
<description>When a file attachment annotation references a file specification dictionary in accordance with
ISO 32000-2:2020, 7.11.3 using the FS entry in accordance with ISO 32000-2:2020, 12.5.6.15, that file
<description>When a file attachment annotation references a file specification dictionary, the file
specification dictionary shall include an AFRelationship entry</description>
</details>
<hash></hash>
<rules>
<rule object="PDFileAttachmentAnnot">
<id specification="ISO_14289_2" clause="8.9.2.4.10" testNumber="1"/>
<description>When a file attachment annotation references a file specification dictionary in accordance with
ISO 32000-2:2020, 7.11.3 using the FS entry in accordance with ISO 32000-2:2020, 12.5.6.15, that file
<description>When a file attachment annotation references a file specification dictionary, the file
specification dictionary shall include an AFRelationship entry</description>
<test>containsFS == false || AFRelationship != null</test>
<error>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFUA_2">
<details creator="veraPDF Consortium" created="2023-03-13T10:53:06.894+03:00">
<name>ISO 14289-2:202x - 8.9 Annotations - 8.9.2.4 Annotation types - Widget annotation</name>
<description>A widget annotation of zero height and width, accordance with ISO 32000-2:2020, 12.7.5.5 shall be
an artifact</description>
<description>A widget annotation of zero height and width shall be an artifact</description>
</details>
<hash></hash>
<rules>
<rule object="PDWidgetAnnot">
<id specification="ISO_14289_2" clause="8.9.2.4.13" testNumber="1"/>
<description>A widget annotation of zero height and width, accordance with ISO 32000-2:2020, 12.7.5.5 shall
be an artifact</description>
<description>A widget annotation of zero height and width shall be an artifact</description>
<test>width != 0 || height != 0 || structParentType == null || isArtifact == true</test>
<error>
<message>A Widget annotation of zero height and width is not marked as an Artifact (structure tag = %1, standard type = %2)</message>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFUA_2">
<details creator="veraPDF Consortium" created="2023-03-13T10:53:06.894+03:00">
<name>ISO 14289-2:202x - 8.9 Annotations - 8.9.2.4 Annotation types - PrinterMark annotation</name>
<description>A printer's mark annotation as specified in ISO 32000-2:2020, 14.11.3 shall be an artifact</description>
<description>A printer's mark annotation shall be an artifact</description>
</details>
<hash></hash>
<rules>
<rule object="PDPrinterMarkAnnot">
<id specification="ISO_14289_2" clause="8.9.2.4.14" testNumber="1"/>
<description>A printer's mark annotation as specified in ISO 32000-2:2020, 14.11.3 shall be an artifact</description>
<description>A printer's mark annotation shall be an artifact</description>
<test>structParentType == null || isArtifact == true</test>
<error>
<message>A PrinterMark annotation is included in logical structure with tag %1 (standard type = %2)</message>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
<message>Rubber stamp annotation contains neither Name nor Contents entry</message>
<arguments/>
</error>
<references/>
<references>
<reference specification="ISO 32000-2:2020" clause="12.5.6.2"/>
</references>
</rule>
</rules>
<variables/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFUA_2">
<details creator="veraPDF Consortium" created="2023-03-13T10:53:06.894+03:00">
<name>ISO 14289-2:202x - 8.9 Annotations - 8.9.4.2 Alt properties - Alt and Contents</name>
<description>Where both Contents and Alt entries are present for the annotation, they shall be identical</description>
<description>Where an annotation has a Contents entry and the directly enclosing structure element has an Alt
entry, the values of Alt and Contents shall be identical</description>
</details>
<hash></hash>
<rules>
<rule object="PDAnnot">
<id specification="ISO_14289_2" clause="8.9.4.2" testNumber="1"/>
<description>Where both Contents and Alt entries are present for the annotation, they shall be identical</description>
<description>Where an annotation has a Contents entry and the directly enclosing structure element has an Alt
entry, the values of Alt and Contents shall be identical</description>
<test>Contents == null || Alt == null || Contents == Alt</test>
<error>
<message>Both Contents and Alt entries are present for the annotation, but they are not identical (Contents = %1, Alt = %2)</message>
Expand Down

0 comments on commit 3f69e7f

Please sign in to comment.