|
9 | 9 | <rule object="MainXMPPackage" tags="metadata">
|
10 | 10 | <id specification="ISO_14289_1" clause="5" testNumber="1"/>
|
11 | 11 | <description>The PDF/UA version and conformance level of a file shall be specified using the PDF/UA Identification extension schema</description>
|
12 |
| - <test>UAIdentification_size == 1</test> |
| 12 | + <test>containsPDFUAIdentification == true</test> |
13 | 13 | <error>
|
14 | 14 | <message>The document metadata stream doesn't contains PDF/UA Identification Schema</message>
|
15 | 15 | <arguments/>
|
|
153 | 153 | <rule object="PDDocument" tags="metadata">
|
154 | 154 | <id specification="ISO_14289_1" clause="7.1" testNumber="8"/>
|
155 | 155 | <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>
|
156 |
| - <test>metadata_size == 1</test> |
| 156 | + <test>containsMetadata == true</test> |
157 | 157 | <error>
|
158 | 158 | <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>
|
159 | 159 | <arguments/>
|
|
188 | 188 | <rule object="PDDocument" tags="structure">
|
189 | 189 | <id specification="ISO_14289_1" clause="7.1" testNumber="11"/>
|
190 | 190 | <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-1:2008, 14.7</description>
|
191 |
| - <test>StructTreeRoot_size == 1</test> |
| 191 | + <test>containsStructTreeRoot == true</test> |
192 | 192 | <error>
|
193 | 193 | <message>StructTreeRoot entry is not present in the document catalog</message>
|
194 | 194 | <arguments/>
|
|
212 | 212 | <rule object="PDOutline" tags="lang">
|
213 | 213 | <id specification="ISO_14289_1" clause="7.2" testNumber="2"/>
|
214 | 214 | <description>Natural language in the Outline entries shall be determined</description>
|
215 |
| - <test>gSizeCatalogLang != 0</test> |
| 215 | + <test>gContainsCatalogLang == true</test> |
216 | 216 | <error>
|
217 | 217 | <message>Natural language in the Outline entries cannot be determined</message>
|
218 | 218 | <arguments/>
|
|
466 | 466 | <rule object="PDStructElem" tags="structure,lang">
|
467 | 467 | <id specification="ISO_14289_1" clause="7.2" testNumber="21"/>
|
468 | 468 | <description>Natural language for text in ActualText attribute shall be determined</description>
|
469 |
| - <test>ActualText == null || Lang_size != 0 || parentLang != null || gSizeCatalogLang != 0</test> |
| 469 | + <test>ActualText == null || containsLang == true || parentLang != null || gContainsCatalogLang == true</test> |
470 | 470 | <error>
|
471 | 471 | <message>Natural language for text in ActualText attribute cannot be determined</message>
|
472 | 472 | <arguments/>
|
|
476 | 476 | <rule object="PDStructElem" tags="structure,lang">
|
477 | 477 | <id specification="ISO_14289_1" clause="7.2" testNumber="22"/>
|
478 | 478 | <description>Natural language for text in Alt attribute shall be determined</description>
|
479 |
| - <test>Alt == null || Lang_size != 0 || parentLang != null || gSizeCatalogLang != 0</test> |
| 479 | + <test>Alt == null || containsLang == true || parentLang != null || gContainsCatalogLang == true</test> |
480 | 480 | <error>
|
481 | 481 | <message>Natural language for text in Alt attribute cannot be determined</message>
|
482 | 482 | <arguments/>
|
|
486 | 486 | <rule object="PDStructElem" tags="structure,lang">
|
487 | 487 | <id specification="ISO_14289_1" clause="7.2" testNumber="23"/>
|
488 | 488 | <description>Natural language for text in E attribute shall be determined</description>
|
489 |
| - <test>E == null || Lang_size != 0 || parentLang != null || gSizeCatalogLang != 0</test> |
| 489 | + <test>E == null || containsLang == true || parentLang != null || gContainsCatalogLang == true</test> |
490 | 490 | <error>
|
491 | 491 | <message>Natural language for text in E attribute cannot be determined</message>
|
492 | 492 | <arguments/>
|
|
496 | 496 | <rule object="PDAnnot" tags="lang,annotation,structure">
|
497 | 497 | <id specification="ISO_14289_1" clause="7.2" testNumber="24"/>
|
498 | 498 | <description>Natural language in the Contents entry for annotations shall be determined</description>
|
499 |
| - <test>Contents == null || Lang_size != 0 || gSizeCatalogLang != 0</test> |
| 499 | + <test>Contents == null || containsLang == true || gContainsCatalogLang == true</test> |
500 | 500 | <error>
|
501 | 501 | <message>Natural language in the Contents entry for annotations cannot be determined</message>
|
502 | 502 | <arguments/>
|
|
506 | 506 | <rule object="PDFormField" tags="structure,lang">
|
507 | 507 | <id specification="ISO_14289_1" clause="7.2" testNumber="25"/>
|
508 | 508 | <description>Natural language in the TU key for form fields shall be determined</description>
|
509 |
| - <test>TU == null || Lang_size != 0 || gSizeCatalogLang != 0</test> |
| 509 | + <test>TU == null || containsLang == true || gContainsCatalogLang == true</test> |
510 | 510 | <error>
|
511 | 511 | <message>Natural language in the TU key for form fields cannot be determined</message>
|
512 | 512 | <arguments/>
|
|
574 | 574 | <rule object="SEMarkedContent" tags="lang,alt-text">
|
575 | 575 | <id specification="ISO_14289_1" clause="7.2" testNumber="30"/>
|
576 | 576 | <description>Natural language for text in ActualText attribute in Span Marked Content shall be determined</description>
|
577 |
| - <test>tag != 'Span' || ActualText == null || Lang != null || inheritedLang != null || gSizeCatalogLang != 0</test> |
| 577 | + <test>tag != 'Span' || ActualText == null || Lang != null || inheritedLang != null || gContainsCatalogLang == true</test> |
578 | 578 | <error>
|
579 | 579 | <message>Natural language for text in ActualText attribute in Span Marked Content cannot be determined</message>
|
580 | 580 | <arguments/>
|
|
584 | 584 | <rule object="SEMarkedContent" tags="lang,alt-text">
|
585 | 585 | <id specification="ISO_14289_1" clause="7.2" testNumber="31"/>
|
586 | 586 | <description>Natural language for text in Alt attribute in Span Marked Content shall be determined</description>
|
587 |
| - <test>tag != 'Span' || Alt == null || Lang != null || inheritedLang != null || gSizeCatalogLang != 0</test> |
| 587 | + <test>tag != 'Span' || Alt == null || Lang != null || inheritedLang != null || gContainsCatalogLang == true</test> |
588 | 588 | <error>
|
589 | 589 | <message>Natural language for text in Alt attribute in Span Marked Content cannot be determined</message>
|
590 | 590 | <arguments/>
|
|
594 | 594 | <rule object="SEMarkedContent" tags="lang,alt-text">
|
595 | 595 | <id specification="ISO_14289_1" clause="7.2" testNumber="32"/>
|
596 | 596 | <description>Natural language for text in E attribute in Span Marked Content shall be determined</description>
|
597 |
| - <test>tag != 'Span' || E == null || Lang != null || inheritedLang != null || gSizeCatalogLang != 0</test> |
| 597 | + <test>tag != 'Span' || E == null || Lang != null || inheritedLang != null || gContainsCatalogLang == true</test> |
598 | 598 | <error>
|
599 | 599 | <message>Natural language for text in E attribute in Span Marked Content cannot be determined</message>
|
600 | 600 | <arguments/>
|
|
604 | 604 | <rule object="XMPLangAlt" deferred="true" tags="lang,metadata">
|
605 | 605 | <id specification="ISO_14289_1" clause="7.2" testNumber="33"/>
|
606 | 606 | <description>Natural language for document metadata shall be determined</description>
|
607 |
| - <test>xDefault == false || gSizeCatalogLang != 0</test> |
| 607 | + <test>xDefault == false || gContainsCatalogLang == true</test> |
608 | 608 | <error>
|
609 | 609 | <message>Natural language for document metadata cannot be determined</message>
|
610 | 610 | <arguments/>
|
|
614 | 614 | <rule object="SETextItem" tags="lang,text">
|
615 | 615 | <id specification="ISO_14289_1" clause="7.2" testNumber="34"/>
|
616 | 616 | <description>Natural language for text in page content shall be determined</description>
|
617 |
| - <test>gSizeCatalogLang != 0 || Lang != null</test> |
| 617 | + <test>gContainsCatalogLang == true || Lang != null</test> |
618 | 618 | <error>
|
619 | 619 | <message>Natural language for text in page content cannot be determined</message>
|
620 | 620 | <arguments/>
|
|
958 | 958 | <rule object="PDPage" tags="page">
|
959 | 959 | <id specification="ISO_14289_1" clause="7.18.3" testNumber="1"/>
|
960 | 960 | <description>Every page on which there is an annotation shall contain in its page dictionary the key Tabs, and its value shall be S</description>
|
961 |
| - <test>annots_size == 0 || Tabs == 'S'</test> |
| 961 | + <test>containsAnnotations == false || Tabs == 'S'</test> |
962 | 962 | <error>
|
963 | 963 | <message>A page with annotation(s) contains Tabs key with value %1 instead of S</message>
|
964 | 964 | <arguments>
|
|
1101 | 1101 | <rule object="PDCIDFont" tags="font">
|
1102 | 1102 | <id specification="ISO_14289_1" clause="7.21.3.2" testNumber="1"/>
|
1103 | 1103 | <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>
|
1104 |
| - <test>Subtype != "CIDFontType2" || CIDToGIDMap != null || fontFile_size == 0</test> |
| 1104 | + <test>Subtype != "CIDFontType2" || CIDToGIDMap != null || containsFontFile == false</test> |
1105 | 1105 | <error>
|
1106 | 1106 | <message>A Type 2 CIDFont dictionary has missing or invalid CIDToGIDMap entry</message>
|
1107 | 1107 | <arguments/>
|
|
1113 | 1113 | <rule object="PDCMap" tags="font">
|
1114 | 1114 | <id specification="ISO_14289_1" clause="7.21.3.3" testNumber="1"/>
|
1115 | 1115 | <description>All CMaps used within a PDF/UA 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>
|
1116 |
| - <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> |
| 1116 | + <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> |
1117 | 1117 | <error>
|
1118 | 1118 | <message>A non-standard CMap %1 is not embedded</message>
|
1119 | 1119 | <arguments>
|
|
1154 | 1154 | <rule object="PDFont" tags="font">
|
1155 | 1155 | <id specification="ISO_14289_1" clause="7.21.4.1" testNumber="1"/>
|
1156 | 1156 | <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>
|
1157 |
| - <test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test> |
| 1157 | + <test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || containsFontFile == true</test> |
1158 | 1158 | <error>
|
1159 | 1159 | <message>The font program is not embedded</message>
|
1160 | 1160 | <arguments/>
|
|
1179 | 1179 | <rule object="PDType1Font" tags="font">
|
1180 | 1180 | <id specification="ISO_14289_1" clause="7.21.4.2" testNumber="1"/>
|
1181 | 1181 | <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>
|
1182 |
| - <test>fontFile_size == 0 || fontName.search(/[A-Z]{6}\+/) != 0 || CharSet == null || charSetListsAllGlyphs == true</test> |
| 1182 | + <test>containsFontFile == false || fontName.search(/[A-Z]{6}\+/) != 0 || CharSet == null || charSetListsAllGlyphs == true</test> |
1183 | 1183 | <error>
|
1184 | 1184 | <message>A CharSet entry in the Descriptor dictionary of a Type1 font incorrectly lists glyphs present in the font program</message>
|
1185 | 1185 | <arguments/>
|
|
1189 | 1189 | <rule object="PDCIDFont" tags="font">
|
1190 | 1190 | <id specification="ISO_14289_1" clause="7.21.4.2" testNumber="2"/>
|
1191 | 1191 | <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>
|
1192 |
| - <test>fontFile_size == 0 || fontName.search(/[A-Z]{6}\+/) != 0 || containsCIDSet == false || cidSetListsAllGlyphs == true</test> |
| 1192 | + <test>containsFontFile == false || fontName.search(/[A-Z]{6}\+/) != 0 || containsCIDSet == false || cidSetListsAllGlyphs == true</test> |
1193 | 1193 | <error>
|
1194 | 1194 | <message>A CIDSet entry in the Font descriptor does not correctly identify all glyphs present in the embedded font subset</message>
|
1195 | 1195 | <arguments/>
|
|
1289 | 1289 | </rule>
|
1290 | 1290 | </rules>
|
1291 | 1291 | <variables>
|
1292 |
| - <variable name="gSizeCatalogLang" object="PDDocument"> |
1293 |
| - <defaultValue>0</defaultValue> |
1294 |
| - <value>Lang_size</value> |
| 1292 | + <variable name="gContainsCatalogLang" object="PDDocument"> |
| 1293 | + <defaultValue>false</defaultValue> |
| 1294 | + <value>containsLang</value> |
1295 | 1295 | </variable>
|
1296 | 1296 | <variable name="usesH" object="SEH">
|
1297 | 1297 | <defaultValue>false</defaultValue>
|
|
0 commit comments