Skip to content

Commit 477e289

Browse files
author
Git User
committed
PDF/A. Update rules about BitsPerComponent
1 parent 1b8207e commit 477e289

File tree

11 files changed

+165
-11
lines changed

11 files changed

+165
-11
lines changed

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@
496496
<rule object="PDXImage">
497497
<id specification="ISO_19005_1" clause="6.2.4" testNumber="4"/>
498498
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4 or 8</description>
499-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8</test>
499+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8</test>
500500
<error>
501501
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
502502
<arguments>
@@ -507,6 +507,20 @@
507507
<reference specification="PDF 1.4 Reference" clause="4.8.4, Table 4.35"/>
508508
</references>
509509
</rule>
510+
<rule object="PDMaskImage">
511+
<id specification="ISO_19005_1" clause="6.2.4" testNumber="5"/>
512+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
513+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
514+
<error>
515+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
516+
<arguments>
517+
<argument>BitsPerComponent</argument>
518+
</arguments>
519+
</error>
520+
<references>
521+
<reference specification="PDF 1.4 Reference" clause="4.8.4, Table 4.35"/>
522+
</references>
523+
</rule>
510524
<rule object="PDXForm">
511525
<id specification="ISO_19005_1" clause="6.2.5" testNumber="1"/>
512526
<description>A form XObject dictionary shall not contain the Subtype2 key with a value of PS or the PS key</description>

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@
496496
<rule object="PDXImage">
497497
<id specification="ISO_19005_1" clause="6.2.4" testNumber="4"/>
498498
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4 or 8</description>
499-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8</test>
499+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8</test>
500500
<error>
501501
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
502502
<arguments>
@@ -507,6 +507,20 @@
507507
<reference specification="PDF 1.4 Reference" clause="4.8.4, Table 4.35"/>
508508
</references>
509509
</rule>
510+
<rule object="PDMaskImage">
511+
<id specification="ISO_19005_1" clause="6.2.4" testNumber="5"/>
512+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
513+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
514+
<error>
515+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
516+
<arguments>
517+
<argument>BitsPerComponent</argument>
518+
</arguments>
519+
</error>
520+
<references>
521+
<reference specification="PDF 1.4 Reference" clause="4.8.4, Table 4.35"/>
522+
</references>
523+
</rule>
510524
<rule object="PDXForm">
511525
<id specification="ISO_19005_1" clause="6.2.5" testNumber="1"/>
512526
<description>A form XObject dictionary shall not contain the Subtype2 key with a value of PS or the PS key</description>

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@
592592
<rule object="PDXImage">
593593
<id specification="ISO_19005_2" clause="6.2.8" testNumber="4"/>
594594
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
595-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
595+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
596596
<error>
597597
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
598598
<arguments>
@@ -603,6 +603,20 @@
603603
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
604604
</references>
605605
</rule>
606+
<rule object="PDMaskImage">
607+
<id specification="ISO_19005_2" clause="6.2.8" testNumber="5"/>
608+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
609+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
610+
<error>
611+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
612+
<arguments>
613+
<argument>BitsPerComponent</argument>
614+
</arguments>
615+
</error>
616+
<references>
617+
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
618+
</references>
619+
</rule>
606620
<rule object="JPEG2000">
607621
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="1"/>
608622
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@
592592
<rule object="PDXImage">
593593
<id specification="ISO_19005_2" clause="6.2.8" testNumber="4"/>
594594
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
595-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
595+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
596596
<error>
597597
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
598598
<arguments>
@@ -603,6 +603,20 @@
603603
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
604604
</references>
605605
</rule>
606+
<rule object="PDMaskImage">
607+
<id specification="ISO_19005_2" clause="6.2.8" testNumber="5"/>
608+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
609+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
610+
<error>
611+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
612+
<arguments>
613+
<argument>BitsPerComponent</argument>
614+
</arguments>
615+
</error>
616+
<references>
617+
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
618+
</references>
619+
</rule>
606620
<rule object="JPEG2000">
607621
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="1"/>
608622
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@
592592
<rule object="PDXImage">
593593
<id specification="ISO_19005_2" clause="6.2.8" testNumber="4"/>
594594
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
595-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
595+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
596596
<error>
597597
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
598598
<arguments>
@@ -603,6 +603,20 @@
603603
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
604604
</references>
605605
</rule>
606+
<rule object="PDMaskImage">
607+
<id specification="ISO_19005_2" clause="6.2.8" testNumber="5"/>
608+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
609+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
610+
<error>
611+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
612+
<arguments>
613+
<argument>BitsPerComponent</argument>
614+
</arguments>
615+
</error>
616+
<references>
617+
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
618+
</references>
619+
</rule>
606620
<rule object="JPEG2000">
607621
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="1"/>
608622
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@
592592
<rule object="PDXImage">
593593
<id specification="ISO_19005_3" clause="6.2.8" testNumber="4"/>
594594
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
595-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
595+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
596596
<error>
597597
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
598598
<arguments>
@@ -603,6 +603,20 @@
603603
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
604604
</references>
605605
</rule>
606+
<rule object="PDMaskImage">
607+
<id specification="ISO_19005_3" clause="6.2.8" testNumber="5"/>
608+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
609+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
610+
<error>
611+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
612+
<arguments>
613+
<argument>BitsPerComponent</argument>
614+
</arguments>
615+
</error>
616+
<references>
617+
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
618+
</references>
619+
</rule>
606620
<rule object="JPEG2000">
607621
<id specification="ISO_19005_3" clause="6.2.8.3" testNumber="1"/>
608622
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@
592592
<rule object="PDXImage">
593593
<id specification="ISO_19005_3" clause="6.2.8" testNumber="4"/>
594594
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
595-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
595+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
596596
<error>
597597
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
598598
<arguments>
@@ -603,6 +603,20 @@
603603
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
604604
</references>
605605
</rule>
606+
<rule object="PDMaskImage">
607+
<id specification="ISO_19005_3" clause="6.2.8" testNumber="5"/>
608+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
609+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
610+
<error>
611+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
612+
<arguments>
613+
<argument>BitsPerComponent</argument>
614+
</arguments>
615+
</error>
616+
<references>
617+
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
618+
</references>
619+
</rule>
606620
<rule object="JPEG2000">
607621
<id specification="ISO_19005_3" clause="6.2.8.3" testNumber="1"/>
608622
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>

core/src/main/resources/org/verapdf/pdfa/validation/PDFA-3U.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@
592592
<rule object="PDXImage">
593593
<id specification="ISO_19005_3" clause="6.2.8" testNumber="4"/>
594594
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
595-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
595+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
596596
<error>
597597
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
598598
<arguments>
@@ -603,6 +603,20 @@
603603
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
604604
</references>
605605
</rule>
606+
<rule object="PDMaskImage">
607+
<id specification="ISO_19005_3" clause="6.2.8" testNumber="5"/>
608+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
609+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
610+
<error>
611+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
612+
<arguments>
613+
<argument>BitsPerComponent</argument>
614+
</arguments>
615+
</error>
616+
<references>
617+
<reference specification="ISO 32000-1:2008" clause="8.9.5.1, Table 89"/>
618+
</references>
619+
</rule>
606620
<rule object="JPEG2000">
607621
<id specification="ISO_19005_3" clause="6.2.8.3" testNumber="1"/>
608622
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@
498498
<rule object="PDXImage">
499499
<id specification="ISO_19005_4" clause="6.2.7.1" testNumber="4"/>
500500
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
501-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
501+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
502502
<error>
503503
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
504504
<arguments>
@@ -509,6 +509,20 @@
509509
<reference specification="ISO 32000-2:2020" clause="8.9.5.1, Table 87"/>
510510
</references>
511511
</rule>
512+
<rule object="PDMaskImage">
513+
<id specification="ISO_19005_4" clause="6.2.7.1" testNumber="5"/>
514+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
515+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
516+
<error>
517+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
518+
<arguments>
519+
<argument>BitsPerComponent</argument>
520+
</arguments>
521+
</error>
522+
<references>
523+
<reference specification="ISO 32000-2:2020" clause="8.9.5.1, Table 87"/>
524+
</references>
525+
</rule>
512526
<rule object="JPEG2000">
513527
<id specification="ISO_19005_4" clause="6.2.7.3" testNumber="1"/>
514528
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>

core/src/main/resources/org/verapdf/pdfa/validation/PDFA-4E.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@
512512
<rule object="PDXImage">
513513
<id specification="ISO_19005_4" clause="6.2.7.1" testNumber="4"/>
514514
<description>If an Image dictionary contains the BitsPerComponent key, its value shall be 1, 2, 4, 8 or 16</description>
515-
<test>BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
515+
<test>isMask == true || BitsPerComponent == null || BitsPerComponent == 1 || BitsPerComponent == 2 || BitsPerComponent == 4 || BitsPerComponent == 8 || BitsPerComponent == 16</test>
516516
<error>
517517
<message>The value of the BitsPerComponent key in the Image dictionary is %1</message>
518518
<arguments>
@@ -523,6 +523,20 @@
523523
<reference specification="ISO 32000-2:2020" clause="8.9.5.1, Table 87"/>
524524
</references>
525525
</rule>
526+
<rule object="PDMaskImage">
527+
<id specification="ISO_19005_4" clause="6.2.7.1" testNumber="5"/>
528+
<description>If an image mask dictionary contains the BitsPerComponent key, its value shall be 1</description>
529+
<test>BitsPerComponent == null || BitsPerComponent == 1</test>
530+
<error>
531+
<message>The value of the BitsPerComponent key in the image mask dictionary is %1</message>
532+
<arguments>
533+
<argument>BitsPerComponent</argument>
534+
</arguments>
535+
</error>
536+
<references>
537+
<reference specification="ISO 32000-2:2020" clause="8.9.5.1, Table 87"/>
538+
</references>
539+
</rule>
526540
<rule object="JPEG2000">
527541
<id specification="ISO_19005_4" clause="6.2.7.3" testNumber="1"/>
528542
<description>The number of colour channels in the JPEG2000 data shall be 1, 3 or 4</description>

0 commit comments

Comments
 (0)