Skip to content

Commit

Permalink
Update rules with new properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov authored and github-actions[bot] committed Oct 8, 2024
1 parent 65811be commit 9206d96
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 101 deletions.
46 changes: 23 additions & 23 deletions PDF_UA/PDFUA-1.xml

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions PDF_UA/PDFUA-2-ISO32005.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<rule object="MainXMPPackage" tags="metadata">
<id specification="ISO_14289_2" clause="5" testNumber="1"/>
<description>The PDF/UA version of a file shall be specified in the value of the Metadata entry in the document catalog using the PDF/UA identification schema</description>
<test>UAIdentification_size == 1</test>
<test>containsPDFUAIdentification == true</test>
<error>
<message>The document metadata stream doesn't contains PDF/UA Identification Schema</message>
<arguments/>
Expand Down Expand Up @@ -67,7 +67,7 @@
<rule object="PDDocument" tags="structure">
<id specification="ISO_14289_2" clause="8.2.1" testNumber="1"/>
<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 ISO 32000-2:2020, 14.7</description>
<test>StructTreeRoot_size == 1</test>
<test>containsStructTreeRoot == true</test>
<error>
<message>StructTreeRoot entry is not present in the document catalog</message>
<arguments/>
Expand Down Expand Up @@ -482,7 +482,7 @@
<rule object="PDDocument" tags="lang">
<id specification="ISO_14289_2" clause="8.4.4" testNumber="1"/>
<description>The default natural language for content and text strings shall be specified using the Lang entry, with a non-empty value, in the catalog dictionary</description>
<test>Lang_size &gt; 0</test>
<test>containsLang == true</test>
<error>
<message>Catalog dictionary does not contain Lang entry</message>
<arguments/>
Expand Down Expand Up @@ -524,7 +524,7 @@
<rule object="PDCIDFont" tags="font">
<id specification="ISO_14289_2" clause="8.4.5.3.2" testNumber="1"/>
<description>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-2:2020, Table 115</description>
<test>Subtype != "CIDFontType2" || CIDToGIDMap != null || fontFile_size == 0</test>
<test>Subtype != "CIDFontType2" || CIDToGIDMap != null || containsFontFile == false</test>
<error>
<message>A Type 2 CIDFont dictionary has missing or invalid CIDToGIDMap entry</message>
<arguments/>
Expand All @@ -536,7 +536,7 @@
<rule object="PDCMap" tags="font">
<id specification="ISO_14289_2" clause="8.4.5.4" testNumber="1"/>
<description>All CMaps used within a file that conforms to PDF/UA-2, except those listed in ISO 32000-2:2020, Table 116, shall be embedded in that file, as described in ISO 32000-2:2020, 9.7.5</description>
<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>
<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>
<error>
<message>A non-standard CMap %1 is not embedded</message>
<arguments>
Expand Down Expand Up @@ -577,7 +577,7 @@
<rule object="PDFont" tags="font">
<id specification="ISO_14289_2" clause="8.4.5.5.1" testNumber="1"/>
<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-2:2020, 9.9</description>
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test>
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || containsFontFile == true</test>
<error>
<message>The font program is not embedded</message>
<arguments/>
Expand Down Expand Up @@ -971,7 +971,7 @@
<rule object="PDPage" tags="page,annotation">
<id specification="ISO_14289_2" clause="8.9.3.3" testNumber="1"/>
<description>Every page that includes an annotation shall contain a Tabs entry in its page dictionary in accordance with ISO 32000-2:2020, Table 31, and its value shall be A, W or S</description>
<test>annots_size == 0 || Tabs == 'A' || Tabs == 'W' || Tabs == 'S'</test>
<test>containsAnnotations == false || Tabs == 'A' || Tabs == 'W' || Tabs == 'S'</test>
<error>
<message>A page with annotation(s) contains Tabs key with value %1 instead of A, W or S</message>
<arguments>
Expand Down Expand Up @@ -1093,7 +1093,7 @@
<rule object="PDDocument" tags="metadata">
<id specification="ISO_14289_2" clause="8.11.1" testNumber="2"/>
<description>The Catalog dictionary of a conforming file shall contain the Metadata key whose value is a metadata stream as defined in ISO 32000-2:2020, 14.3. The metadata stream dictionary shall contain entry Type with value /Metadata and entry Subtype with value /XML</description>
<test>metadata_size == 1</test>
<test>containsMetadata == true</test>
<error>
<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>
<arguments/>
Expand Down
16 changes: 8 additions & 8 deletions PDF_UA/PDFUA-2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<rule object="MainXMPPackage" tags="metadata">
<id specification="ISO_14289_2" clause="5" testNumber="1"/>
<description>The PDF/UA version of a file shall be specified in the value of the Metadata entry in the document catalog using the PDF/UA identification schema</description>
<test>UAIdentification_size == 1</test>
<test>containsPDFUAIdentification == true</test>
<error>
<message>The document metadata stream doesn't contains PDF/UA Identification Schema</message>
<arguments/>
Expand Down Expand Up @@ -67,7 +67,7 @@
<rule object="PDDocument" tags="structure">
<id specification="ISO_14289_2" clause="8.2.1" testNumber="1"/>
<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 ISO 32000-2:2020, 14.7</description>
<test>StructTreeRoot_size == 1</test>
<test>containsStructTreeRoot == true</test>
<error>
<message>StructTreeRoot entry is not present in the document catalog</message>
<arguments/>
Expand Down Expand Up @@ -482,7 +482,7 @@
<rule object="PDDocument" tags="lang">
<id specification="ISO_14289_2" clause="8.4.4" testNumber="1"/>
<description>The default natural language for content and text strings shall be specified using the Lang entry, with a non-empty value, in the catalog dictionary</description>
<test>Lang_size &gt; 0</test>
<test>containsLang == true</test>
<error>
<message>Catalog dictionary does not contain Lang entry</message>
<arguments/>
Expand Down Expand Up @@ -524,7 +524,7 @@
<rule object="PDCIDFont" tags="font">
<id specification="ISO_14289_2" clause="8.4.5.3.2" testNumber="1"/>
<description>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-2:2020, Table 115</description>
<test>Subtype != "CIDFontType2" || CIDToGIDMap != null || fontFile_size == 0</test>
<test>Subtype != "CIDFontType2" || CIDToGIDMap != null || containsFontFile == false</test>
<error>
<message>A Type 2 CIDFont dictionary has missing or invalid CIDToGIDMap entry</message>
<arguments/>
Expand All @@ -536,7 +536,7 @@
<rule object="PDCMap" tags="font">
<id specification="ISO_14289_2" clause="8.4.5.4" testNumber="1"/>
<description>All CMaps used within a file that conforms to PDF/UA-2, except those listed in ISO 32000-2:2020, Table 116, shall be embedded in that file, as described in ISO 32000-2:2020, 9.7.5</description>
<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>
<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>
<error>
<message>A non-standard CMap %1 is not embedded</message>
<arguments>
Expand Down Expand Up @@ -577,7 +577,7 @@
<rule object="PDFont" tags="font">
<id specification="ISO_14289_2" clause="8.4.5.5.1" testNumber="1"/>
<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-2:2020, 9.9</description>
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test>
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || containsFontFile == true</test>
<error>
<message>The font program is not embedded</message>
<arguments/>
Expand Down Expand Up @@ -971,7 +971,7 @@
<rule object="PDPage" tags="page,annotation">
<id specification="ISO_14289_2" clause="8.9.3.3" testNumber="1"/>
<description>Every page that includes an annotation shall contain a Tabs entry in its page dictionary in accordance with ISO 32000-2:2020, Table 31, and its value shall be A, W or S</description>
<test>annots_size == 0 || Tabs == 'A' || Tabs == 'W' || Tabs == 'S'</test>
<test>containsAnnotations == false || Tabs == 'A' || Tabs == 'W' || Tabs == 'S'</test>
<error>
<message>A page with annotation(s) contains Tabs key with value %1 instead of A, W or S</message>
<arguments>
Expand Down Expand Up @@ -1093,7 +1093,7 @@
<rule object="PDDocument" tags="metadata">
<id specification="ISO_14289_2" clause="8.11.1" testNumber="2"/>
<description>The Catalog dictionary of a conforming file shall contain the Metadata key whose value is a metadata stream as defined in ISO 32000-2:2020, 14.3. The metadata stream dictionary shall contain entry Type with value /Metadata and entry Subtype with value /XML</description>
<test>metadata_size == 1</test>
<test>containsMetadata == true</test>
<error>
<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>
<arguments/>
Expand Down
Loading

0 comments on commit 9206d96

Please sign in to comment.