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 committed Oct 16, 2024
1 parent a10d630 commit 1aaa2a6
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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 ||
<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>
Expand Down
25 changes: 25 additions & 0 deletions PDF_A/1b/6.2 Graphics/6.2.4 Images/verapdf-profile-6-2-4-t05.xml
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="PDFA_1_A">
<details creator="veraPDF Consortium" created="2023-07-10T10:58:05.420+03:00">
<name>ISO 19005-1:2005 - 6.2.4 Images - BitsPerComponent in image mask</name>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
</details>
<hash></hash>
<rules>
<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>
</rules>
<variables/>
</profile>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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 ||
<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>
Expand Down
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="PDFA_2_B">
<details creator="veraPDF Consortium" created="2023-07-10T10:58:05.420+03:00">
<name>ISO 19005-2:2011 - 6.2.8 Images - BitsPerComponent in image mask</name>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
</details>
<hash></hash>
<rules>
<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>
</rules>
<variables/>
</profile>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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 ||
<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>
Expand Down
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="PDFA_4">
<details creator="veraPDF Consortium" created="2023-07-10T10:58:05.420+03:00">
<name>ISO 19005-4:2020 - 6.2.7 Images - BitsPerComponent in image mask</name>
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
</details>
<hash></hash>
<rules>
<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>
</rules>
<variables/>
</profile>

0 comments on commit 1aaa2a6

Please sign in to comment.