Skip to content

Commit

Permalink
PDF/A. Update rules about BitsPerComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov authored and github-actions[bot] committed Oct 16, 2024
1 parent 1aaa2a6 commit 2a40c79
Show file tree
Hide file tree
Showing 11 changed files with 165 additions and 11 deletions.
16 changes: 15 additions & 1 deletion PDF_A/PDFA-1A.xml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_1" clause="6.2.4" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4 or 8</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -507,6 +507,20 @@
<reference specification="PDF 1.4 Reference" clause="4.8.4, Table 4.35"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_1" clause="6.2.4" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="PDF 1.4 Reference" clause="4.8.4, Table 4.35"/>
</references>
</rule>
<rule object="PDXForm">
<id specification="ISO_19005_1" clause="6.2.5" testNumber="1"/>
<description>A form XObject dictionary shall not contain the Subtype2 key with a value of PS or the PS key</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-1B.xml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_1" clause="6.2.4" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4 or 8</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -507,6 +507,20 @@
<reference specification="PDF 1.4 Reference" clause="4.8.4, Table 4.35"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_1" clause="6.2.4" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="PDF 1.4 Reference" clause="4.8.4, Table 4.35"/>
</references>
</rule>
<rule object="PDXForm">
<id specification="ISO_19005_1" clause="6.2.5" testNumber="1"/>
<description>A form XObject dictionary shall not contain the Subtype2 key with a value of PS or the PS key</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-2A.xml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_2" clause="6.2.8" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -603,6 +603,20 @@
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_2" clause="6.2.8" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="JPEG2000">
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="1"/>
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-2B.xml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_2" clause="6.2.8" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -603,6 +603,20 @@
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_2" clause="6.2.8" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="JPEG2000">
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="1"/>
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-2U.xml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_2" clause="6.2.8" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -603,6 +603,20 @@
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_2" clause="6.2.8" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="JPEG2000">
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="1"/>
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-3A.xml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_3" clause="6.2.8" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -603,6 +603,20 @@
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_3" clause="6.2.8" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="JPEG2000">
<id specification="ISO_19005_3" clause="6.2.8.3" testNumber="1"/>
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-3B.xml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_3" clause="6.2.8" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -603,6 +603,20 @@
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_3" clause="6.2.8" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="JPEG2000">
<id specification="ISO_19005_3" clause="6.2.8.3" testNumber="1"/>
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-3U.xml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_3" clause="6.2.8" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -603,6 +603,20 @@
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_3" clause="6.2.8" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
</references>
</rule>
<rule object="JPEG2000">
<id specification="ISO_19005_3" clause="6.2.8.3" testNumber="1"/>
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_4" clause="6.2.7.1" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -509,6 +509,20 @@
<reference specification="ISO 32000-2:2020" clause="8.9.5.1, Table 87"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_4" clause="6.2.7.1" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-2:2020" clause="8.9.5.1, Table 87"/>
</references>
</rule>
<rule object="JPEG2000">
<id specification="ISO_19005_4" clause="6.2.7.3" testNumber="1"/>
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>
Expand Down
16 changes: 15 additions & 1 deletion PDF_A/PDFA-4E.xml
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
<rule object="PDXImage">
<id specification="ISO_19005_4" clause="6.2.7.1" testNumber="4"/>
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
<error>
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
<arguments>
Expand All @@ -523,6 +523,20 @@
<reference specification="ISO 32000-2:2020" clause="8.9.5.1, Table 87"/>
</references>
</rule>
<rule object="PDMaskImage">
<id specification="ISO_19005_4" clause="6.2.7.1" testNumber="5"/>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
<error>
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
<arguments>
<argument>BitsPerComponent</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-2:2020" clause="8.9.5.1, Table 87"/>
</references>
</rule>
<rule object="JPEG2000">
<id specification="ISO_19005_4" clause="6.2.7.3" testNumber="1"/>
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>
Expand Down
Loading

0 comments on commit 2a40c79

Please sign in to comment.