Skip to content

Commit 37b049f

Browse files
author
Git User
committed
Update rules with new properties
1 parent 24afef8 commit 37b049f

File tree

11 files changed

+79
-79
lines changed

11 files changed

+79
-79
lines changed

core/src/main/resources/org/verapdf/pdfa/validation/PDFA-1A.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@
721721
<rule object="PDCMap">
722722
<id specification="ISO_19005_1" clause="6.3.3.3" testNumber="1"/>
723723
<description>All CMaps used within a conforming file, except Identity-H and Identity-V, shall be embedded in that file as described in PDF Reference 5.6.4</description>
724-
<test>CMapName == "Identity-H" || CMapName == "Identity-V" || embeddedFile_size == 1</test>
724+
<test>CMapName == "Identity-H" || CMapName == "Identity-V" || containsEmbeddedFile == true</test>
725725
<error>
726726
<message>A CMap is different from "Identity-H" or "Identity-V" and is not embedded</message>
727727
<arguments/>
@@ -746,7 +746,7 @@
746746
<rule object="PDFont">
747747
<id specification="ISO_19005_1" clause="6.3.4" testNumber="1"/>
748748
<description>The font programs for all fonts used within a conforming file shall be embedded within that file, as defined in PDF Reference 5.8, except when the fonts are used exclusively with text rendering mode 3</description>
749-
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test>
749+
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || containsFontFile == true</test>
750750
<error>
751751
<message>The font program is not embedded</message>
752752
<arguments/>
@@ -997,7 +997,7 @@
997997
<rule object="PDAnnot">
998998
<id specification="ISO_19005_1" clause="6.5.3" testNumber="5"/>
999999
<description>If an annotation dictionary's Subtype key has a value of Widget and its FT key has a value of Btn, the value of the N key shall be an appearance subdictionary</description>
1000-
<test>AP != "N" || Subtype != "Widget" || FT != "Btn" || (N_type == "Dict" &amp;&amp; appearance_size &gt; 0)</test>
1000+
<test>AP != "N" || Subtype != "Widget" || FT != "Btn" || (N_type == "Dict" &amp;&amp; containsAppearances == true)</test>
10011001
<error>
10021002
<message>An annotation dictionary's Subtype key has a value of Widget and its FT key has a value of Btn, but the value of the N key is %1 instead of appearance subdictionary</message>
10031003
<arguments>
@@ -1094,7 +1094,7 @@
10941094
<rule object="PDDocument">
10951095
<id specification="ISO_19005_1" clause="6.7.2" testNumber="1"/>
10961096
<description>The document catalog dictionary of a conforming file shall contain the Metadata key. The metadata stream dictionary shall contain entry Type with value /Metadata and entry Subtype with value /XML</description>
1097-
<test>metadata_size == 1</test>
1097+
<test>containsMetadata == true</test>
10981098
<error>
10991099
<message>The document catalog dictionary doesn't contain metadata key or metadata stream dictionary does not contain either entry Type with value /Metadata or entry Subtype with value /XML</message>
11001100
<arguments/>
@@ -1551,7 +1551,7 @@
15511551
<rule object="MainXMPPackage">
15521552
<id specification="ISO_19005_1" clause="6.7.11" testNumber="1"/>
15531553
<description>The PDF/A version and conformance level of a file shall be specified using the PDF/A Identification extension schema</description>
1554-
<test>Identification_size == 1</test>
1554+
<test>containsPDFAIdentification == true</test>
15551555
<error>
15561556
<message>The document metadata stream doesn't contains PDF/A Identification Schema</message>
15571557
<arguments/>
@@ -1636,7 +1636,7 @@
16361636
<rule object="PDDocument">
16371637
<id specification="ISO_19005_1" clause="6.8.3.3" testNumber="1"/>
16381638
<description>The logical structure of the conforming file shall be described by a structure hierarchy rooted in the StructTreeRoot entry of the document catalog dictionary, as described in PDF Reference 9.6</description>
1639-
<test>StructTreeRoot_size == 1</test>
1639+
<test>containsStructTreeRoot == true</test>
16401640
<error>
16411641
<message>StructTreeRoot entry is not present in the document catalog</message>
16421642
<arguments/>

core/src/main/resources/org/verapdf/pdfa/validation/PDFA-1B.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@
721721
<rule object="PDCMap">
722722
<id specification="ISO_19005_1" clause="6.3.3.3" testNumber="1"/>
723723
<description>All CMaps used within a conforming file, except Identity-H and Identity-V, shall be embedded in that file as described in PDF Reference 5.6.4</description>
724-
<test>CMapName == "Identity-H" || CMapName == "Identity-V" || embeddedFile_size == 1</test>
724+
<test>CMapName == "Identity-H" || CMapName == "Identity-V" || containsEmbeddedFile == true</test>
725725
<error>
726726
<message>A CMap is different from "Identity-H" or "Identity-V" and is not embedded</message>
727727
<arguments/>
@@ -746,7 +746,7 @@
746746
<rule object="PDFont">
747747
<id specification="ISO_19005_1" clause="6.3.4" testNumber="1"/>
748748
<description>The font programs for all fonts used within a conforming file shall be embedded within that file, as defined in PDF Reference 5.8, except when the fonts are used exclusively with text rendering mode 3</description>
749-
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test>
749+
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || containsFontFile == true</test>
750750
<error>
751751
<message>The font program is not embedded</message>
752752
<arguments/>
@@ -987,7 +987,7 @@
987987
<rule object="PDAnnot">
988988
<id specification="ISO_19005_1" clause="6.5.3" testNumber="5"/>
989989
<description>If an annotation dictionary's Subtype key has a value of Widget and its FT key has a value of Btn, the value of the N key shall be an appearance subdictionary</description>
990-
<test>AP != "N" || Subtype != "Widget" || FT != "Btn" || (N_type == "Dict" &amp;&amp; appearance_size &gt; 0)</test>
990+
<test>AP != "N" || Subtype != "Widget" || FT != "Btn" || (N_type == "Dict" &amp;&amp; containsAppearances == true)</test>
991991
<error>
992992
<message>An annotation dictionary's Subtype key has a value of Widget and its FT key has a value of Btn, but the value of the N key is %1 instead of appearance subdictionary</message>
993993
<arguments>
@@ -1084,7 +1084,7 @@
10841084
<rule object="PDDocument">
10851085
<id specification="ISO_19005_1" clause="6.7.2" testNumber="1"/>
10861086
<description>The document catalog dictionary of a conforming file shall contain the Metadata key. The metadata stream dictionary shall contain entry Type with value /Metadata and entry Subtype with value /XML</description>
1087-
<test>metadata_size == 1</test>
1087+
<test>containsMetadata == true</test>
10881088
<error>
10891089
<message>The document catalog dictionary doesn't contain metadata key or metadata stream dictionary does not contain either entry Type with value /Metadata or entry Subtype with value /XML</message>
10901090
<arguments/>
@@ -1541,7 +1541,7 @@
15411541
<rule object="MainXMPPackage">
15421542
<id specification="ISO_19005_1" clause="6.7.11" testNumber="1"/>
15431543
<description>The PDF/A version and conformance level of a file shall be specified using the PDF/A Identification extension schema</description>
1544-
<test>Identification_size == 1</test>
1544+
<test>containsPDFAIdentification == true</test>
15451545
<error>
15461546
<message>The document metadata stream doesn't contains PDF/A Identification Schema</message>
15471547
<arguments/>

core/src/main/resources/org/verapdf/pdfa/validation/PDFA-2A.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@
846846
<rule object="PDCIDFont">
847847
<id specification="ISO_19005_2" clause="6.2.11.3.2" testNumber="1"/>
848848
<description>ISO 32000-1:2008, 9.7.4, Table 117 requires that all embedded Type 2 CIDFonts in the CIDFont dictionary shall contain a CIDToGIDMap entry that shall be a stream mapping from CIDs to glyph indices or the name Identity, as described in ISO 32000-1:2008, 9.7.4, Table 117</description>
849-
<test>Subtype != "CIDFontType2" || CIDToGIDMap != null || fontFile_size == 0</test>
849+
<test>Subtype != "CIDFontType2" || CIDToGIDMap != null || containsFontFile == false</test>
850850
<error>
851851
<message>A Type 2 CIDFont dictionary has missing or invalid CIDToGIDMap entry</message>
852852
<arguments/>
@@ -858,7 +858,7 @@
858858
<rule object="PDCMap">
859859
<id specification="ISO_19005_2" clause="6.2.11.3.3" testNumber="1"/>
860860
<description>All CMaps used within a PDF/A-2 file, except those listed in ISO 32000-1:2008, 9.7.5.2, Table 118, shall be embedded in that file as described in ISO 32000-1:2008, 9.7.5</description>
861-
<test>CMapName == "Identity-H" || CMapName == "Identity-V" || CMapName == "GB-EUC-H" || CMapName == "GB-EUC-V" || CMapName == "GBpc-EUC-H" || CMapName == "GBpc-EUC-V" || CMapName == "GBK-EUC-H" || CMapName == "GBK-EUC-V" || CMapName == "GBKp-EUC-H" || CMapName == "GBKp-EUC-V" || CMapName == "GBK2K-H" || CMapName == "GBK2K-V" || CMapName == "UniGB-UCS2-H" || CMapName == "UniGB-UCS2-V" || CMapName == "UniGB-UFT16-H" || CMapName == "UniGB-UFT16-V" || CMapName == "B5pc-H" || CMapName == "B5pc-V" || CMapName == "HKscs-B5-H" || CMapName == "HKscs-B5-V" || CMapName == "ETen-B5-H" || CMapName == "ETen-B5-V" || CMapName == "ETenms-B5-H" || CMapName == "ETenms-B5-V" || CMapName == "CNS-EUC-H" || CMapName == "CNS-EUC-V" || CMapName == "UniCNS-UCS2-H" || CMapName == "UniCNS-UCS2-V" || CMapName == "UniCNS-UFT16-H" || CMapName == "UniCNS-UTF16-V" || CMapName == "83pv-RKSJ-H" || CMapName == "90ms-RKSJ-H" || CMapName == "90ms-RKSJ-V" || CMapName == "90msp-RKSJ-H" || CMapName == "90msp-RKSJ-V" || CMapName == "90pv-RKSJ-H" || CMapName == "Add-RKSJ-H" || CMapName == "Add-RKSJ-V" || CMapName == "EUC-H" || CMapName == "EUC-V" || CMapName == "Ext-RKSJ-H" || CMapName == "Ext-RKSJ-V" || CMapName == "H" || CMapName == "V" || CMapName == "UniJIS-UCS2-H" || CMapName == "UniJIS-UCS2-V" || CMapName == "UniJIS-UCS2-HW-H" || CMapName == "UniJIS-UCS2-HW-V" || CMapName == "UniJIS-UTF16-H" || CMapName == "UniJIS-UTF16-V" || CMapName == "KSC-EUC-H" || CMapName == "KSC-EUC-V" || CMapName == "KSCms-UHC-H" || CMapName == "KSCms-UHC-V" || CMapName == "KSCms-UHC-HW-H" || CMapName == "KSCms-UHC-HW-V" || CMapName == "KSCpc-EUC-H" || CMapName == "UniKS-UCS2-H" || CMapName == "UniKS-UCS2-V" || CMapName == "UniKS-UTF16-H" || CMapName == "UniKS-UTF16-V" || embeddedFile_size == 1</test>
861+
<test>CMapName == "Identity-H" || CMapName == "Identity-V" || CMapName == "GB-EUC-H" || CMapName == "GB-EUC-V" || CMapName == "GBpc-EUC-H" || CMapName == "GBpc-EUC-V" || CMapName == "GBK-EUC-H" || CMapName == "GBK-EUC-V" || CMapName == "GBKp-EUC-H" || CMapName == "GBKp-EUC-V" || CMapName == "GBK2K-H" || CMapName == "GBK2K-V" || CMapName == "UniGB-UCS2-H" || CMapName == "UniGB-UCS2-V" || CMapName == "UniGB-UFT16-H" || CMapName == "UniGB-UFT16-V" || CMapName == "B5pc-H" || CMapName == "B5pc-V" || CMapName == "HKscs-B5-H" || CMapName == "HKscs-B5-V" || CMapName == "ETen-B5-H" || CMapName == "ETen-B5-V" || CMapName == "ETenms-B5-H" || CMapName == "ETenms-B5-V" || CMapName == "CNS-EUC-H" || CMapName == "CNS-EUC-V" || CMapName == "UniCNS-UCS2-H" || CMapName == "UniCNS-UCS2-V" || CMapName == "UniCNS-UFT16-H" || CMapName == "UniCNS-UTF16-V" || CMapName == "83pv-RKSJ-H" || CMapName == "90ms-RKSJ-H" || CMapName == "90ms-RKSJ-V" || CMapName == "90msp-RKSJ-H" || CMapName == "90msp-RKSJ-V" || CMapName == "90pv-RKSJ-H" || CMapName == "Add-RKSJ-H" || CMapName == "Add-RKSJ-V" || CMapName == "EUC-H" || CMapName == "EUC-V" || CMapName == "Ext-RKSJ-H" || CMapName == "Ext-RKSJ-V" || CMapName == "H" || CMapName == "V" || CMapName == "UniJIS-UCS2-H" || CMapName == "UniJIS-UCS2-V" || CMapName == "UniJIS-UCS2-HW-H" || CMapName == "UniJIS-UCS2-HW-V" || CMapName == "UniJIS-UTF16-H" || CMapName == "UniJIS-UTF16-V" || CMapName == "KSC-EUC-H" || CMapName == "KSC-EUC-V" || CMapName == "KSCms-UHC-H" || CMapName == "KSCms-UHC-V" || CMapName == "KSCms-UHC-HW-H" || CMapName == "KSCms-UHC-HW-V" || CMapName == "KSCpc-EUC-H" || CMapName == "UniKS-UCS2-H" || CMapName == "UniKS-UCS2-V" || CMapName == "UniKS-UTF16-H" || CMapName == "UniKS-UTF16-V" || containsEmbeddedFile == true</test>
862862
<error>
863863
<message>A non-standard CMap %1 is not embedded</message>
864864
<arguments>
@@ -899,7 +899,7 @@
899899
<rule object="PDFont">
900900
<id specification="ISO_19005_2" clause="6.2.11.4.1" testNumber="1"/>
901901
<description>The font programs for all fonts used for rendering within a conforming file shall be embedded within that file, as defined in ISO 32000-1:2008, 9.9</description>
902-
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test>
902+
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || containsFontFile == true</test>
903903
<error>
904904
<message>The font program is not embedded</message>
905905
<arguments/>
@@ -923,7 +923,7 @@
923923
<rule object="PDType1Font">
924924
<id specification="ISO_19005_2" clause="6.2.11.4.2" testNumber="1"/>
925925
<description>If the FontDescriptor dictionary of an embedded Type 1 font contains a CharSet string, then it shall list the character names of all glyphs present in the font program, regardless of whether a glyph in the font is referenced or used by the PDF or not</description>
926-
<test>fontFile_size == 0 || fontName.search(/[A-Z]{6}\+/) != 0 || CharSet == null || charSetListsAllGlyphs == true</test>
926+
<test>containsFontFile == false || fontName.search(/[A-Z]{6}\+/) != 0 || CharSet == null || charSetListsAllGlyphs == true</test>
927927
<error>
928928
<message>A CharSet entry in the Descriptor dictionary of a Type1 font incorrectly lists glyphs present in the font program</message>
929929
<arguments/>
@@ -933,7 +933,7 @@
933933
<rule object="PDCIDFont">
934934
<id specification="ISO_19005_2" clause="6.2.11.4.2" testNumber="2"/>
935935
<description>If the FontDescriptor dictionary of an embedded CID font contains a CIDSet stream, then it shall identify all CIDs which are present in the font program, regardless of whether a CID in the font is referenced or used by the PDF or not</description>
936-
<test>fontFile_size == 0 || fontName.search(/[A-Z]{6}\+/) != 0 || containsCIDSet == false || cidSetListsAllGlyphs == true</test>
936+
<test>containsFontFile == false || fontName.search(/[A-Z]{6}\+/) != 0 || containsCIDSet == false || cidSetListsAllGlyphs == true</test>
937937
<error>
938938
<message>A CIDSet entry in the Font descriptor does not correctly identify all glyphs present in the embedded font subset</message>
939939
<arguments/>
@@ -1111,7 +1111,7 @@
11111111
<rule object="PDAnnot">
11121112
<id specification="ISO_19005_2" clause="6.3.3" testNumber="3"/>
11131113
<description>If an annotation dictionary's Subtype key has a value of Widget and its FT key has a value of Btn, the value of the N key shall be an appearance subdictionary</description>
1114-
<test>AP != "N" || Subtype != "Widget" || FT != "Btn" || (N_type == "Dict" &amp;&amp; appearance_size &gt; 0)</test>
1114+
<test>AP != "N" || Subtype != "Widget" || FT != "Btn" || (N_type == "Dict" &amp;&amp; containsAppearances == true)</test>
11151115
<error>
11161116
<message>An annotation dictionary's Subtype key has a value of Widget and its FT key has a value of Btn, but the value of the N key is %1 instead of appearance subdictionary</message>
11171117
<arguments>
@@ -1277,7 +1277,7 @@
12771277
<rule object="PDDocument">
12781278
<id specification="ISO_19005_2" clause="6.6.2.1" testNumber="1"/>
12791279
<description>The Catalog dictionary of a conforming file shall contain the Metadata key whose value is a metadata stream as defined in ISO 32000-1:2008, 14.3.2. The metadata stream dictionary shall contain entry Type with value /Metadata and entry Subtype with value /XML</description>
1280-
<test>metadata_size == 1</test>
1280+
<test>containsMetadata == true</test>
12811281
<error>
12821282
<message>The document catalog dictionary doesn't contain metadata key or metadata stream dictionary does not contain either entry Type with value /Metadata or entry Subtype with value /XML</message>
12831283
<arguments/>
@@ -1608,7 +1608,7 @@
16081608
<rule object="MainXMPPackage">
16091609
<id specification="ISO_19005_2" clause="6.6.4" testNumber="1"/>
16101610
<description>The PDF/A version and conformance level of a file shall be specified using the PDF/A Identification extension schema</description>
1611-
<test>Identification_size == 1</test>
1611+
<test>containsPDFAIdentification == true</test>
16121612
<error>
16131613
<message>The document metadata stream doesn't contains PDF/A Identification Schema</message>
16141614
<arguments/>
@@ -1705,7 +1705,7 @@
17051705
<rule object="PDDocument">
17061706
<id specification="ISO_19005_2" clause="6.7.3.3" testNumber="1"/>
17071707
<description>The logical structure of the conforming file shall be described by a structure hierarchy rooted in the StructTreeRoot entry of the document's Catalog dictionary, as described in ISO 32000-1:2008, 14.7</description>
1708-
<test>StructTreeRoot_size == 1</test>
1708+
<test>containsStructTreeRoot == true</test>
17091709
<error>
17101710
<message>StructTreeRoot entry is not present in the document catalog</message>
17111711
<arguments/>

0 commit comments

Comments
 (0)