|
|
|
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
|
|
|
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_2_U">
|
|
|
|
|
<details creator="veraPDF Consortium" created="2017-08-25T04:58:57.436-03:00">
|
|
|
|
|
<name>Custom profile for Charles University, version 0.8</name>
|
|
|
|
|
<description>Validation rules against ISO 19005-2:2011, Level U</description>
|
|
|
|
|
</details>
|
|
|
|
|
<hash></hash>
|
|
|
|
|
<rules>
|
|
|
|
|
<rule object="CosDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.2" testNumber="1"/>
|
|
|
|
|
<description>The file header shall begin at byte zero and shall consist of "%PDF-1.n" followed by a single EOL marker,
|
|
|
|
|
where 'n' is a single digit number between 0 (30h) and 7 (37h)</description>
|
|
|
|
|
<test>headerOffset == 0 && /^%PDF-1\.[0-7]$/.test(header)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>File header does not start at byte offset 0 or does not comply with the requirements of PDF/A-2 specification</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.2" testNumber="2"/>
|
|
|
|
|
<description>The aforementioned EOL marker shall be immediately followed by a % (25h) character followed by at least four bytes, each of whose encoded
|
|
|
|
|
byte values shall have a decimal value greater than 127</description>
|
|
|
|
|
<test>headerByte1 > 127 && headerByte2 > 127 && headerByte3 > 127 && headerByte4 > 127</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Binary comment in the file header is missing or does not comply PDF/A requirements</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.3" testNumber="1"/>
|
|
|
|
|
<description>The file trailer dictionary shall contain the ID keyword whose value shall be File Identifiers as defined in ISO 32000-1:2008, 14.4</description>
|
|
|
|
|
<test>lastID != null && lastID.length() > 0</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Missing ID in the document trailer</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="14.4"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosTrailer">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.3" testNumber="2"/>
|
|
|
|
|
<description>The keyword Encrypt shall not be used in the trailer dictionary</description>
|
|
|
|
|
<test>isEncrypted != true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Encrypt keyword is present in the trailer dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.3" testNumber="3"/>
|
|
|
|
|
<description>No data can follow the last end-of-file marker except a single optional end-of-line marker as described in ISO 32000-1:2008, 7.5.5.</description>
|
|
|
|
|
<test>postEOFDataSize == 0</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Data is present after the last end-of-file marker</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="7.5.5"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosXRef">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.4" testNumber="2"/>
|
|
|
|
|
<description>The xref keyword and the cross-reference subsection header shall be separated by a single EOL marker</description>
|
|
|
|
|
<test>xrefEOLMarkersComplyPDFA</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Spacings after the 'xref' keyword iin the cross reference table do not comply PDF/A specification</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosString">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.6" testNumber="1"/>
|
|
|
|
|
<description>Hexadecimal strings shall contain an even number of non-white-space characters</description>
|
|
|
|
|
<test>(isHex != true) || hexCount % 2 == 0</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The number of hexadecimal digits in a hexadecimal string shall always be even</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosString">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.6" testNumber="2"/>
|
|
|
|
|
<description>A hexadecimal string is written as a sequence of hexadecimal digits (0–9 and either A–F or a–f)</description>
|
|
|
|
|
<test>(isHex != true) || containsOnlyHex</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Hexadecimal string contains non-white-space characters outside the range 0 to 9, A to F or a to f</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<!-- <rule object="CosStream"> -->
|
|
|
|
|
<!-- <id specification="ISO_19005_2" clause="6.1.7" testNumber="1"/> -->
|
|
|
|
|
<!-- <description>The value of the Length key specified in the stream dictionary shall match the number of bytes in the file following the LINE FEED (0Ah) character -->
|
|
|
|
|
<!-- after the stream keyword and preceding the EOL marker before the endstream keyword.</description> -->
|
|
|
|
|
<!-- <test>isLengthCorrect</test> -->
|
|
|
|
|
<!-- <error> -->
|
|
|
|
|
<!-- <message>Actual length of the stream does not match the value of the Length key in the Stream dictionary</message> -->
|
|
|
|
|
<!-- <arguments/> -->
|
|
|
|
|
<!-- </error> -->
|
|
|
|
|
<!-- <references/> -->
|
|
|
|
|
<!-- </rule>
|
|
|
|
|
<rule object="CosStream">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.7" testNumber="2"/>
|
|
|
|
|
<description>The stream keyword shall be followed either by a CARRIAGE RETURN (0Dh) and LINE FEED (0Ah) character sequence or by a single LINE FEED (0Ah)
|
|
|
|
|
character. The endstream keyword shall be preceded by an EOL marker.</description>
|
|
|
|
|
<test>streamKeywordCRLFCompliant == true && endstreamKeywordEOLCompliant == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Spacings of keywords 'stream' and 'endstream' do not comply PDF/A specification</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule> -->
|
|
|
|
|
<rule object="CosStream">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.7" testNumber="3"/>
|
|
|
|
|
<description>A stream dictionary shall not contain the F, FFilter, or FDecodeParams keys</description>
|
|
|
|
|
<test>F == null && FFilter == null && FDecodeParms == null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A stream object dictionary contains one of the F, FFilter, or FDecodeParms keys</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosFilter">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.7" testNumber="4"/>
|
|
|
|
|
<description>All standard stream filters listed in ISO 32000-1:2008, 7.4, Table 6 may be used, with the exception of
|
|
|
|
|
LZWDecode. In addition, the Crypt filter shall not be used unless the value of the Name key in the decode
|
|
|
|
|
parameters dictionary is Identity. Filters that are not listed in ISO 32000-1:2008, 7.4, Table 6 shall not be
|
|
|
|
|
used.</description>
|
|
|
|
|
<test>
|
|
|
|
|
internalRepresentation == "ASCIIHexDecode" || internalRepresentation == "ASCII85Decode" ||
|
|
|
|
|
internalRepresentation == "FlateDecode" || internalRepresentation == "RunLengthDecode" ||
|
|
|
|
|
internalRepresentation == "CCITTFaxDecode" || internalRepresentation == "JBIG2Decode" ||
|
|
|
|
|
internalRepresentation == "DCTDecode" || internalRepresentation == "JPXDecode" ||
|
|
|
|
|
(internalRepresentation == "Crypt" && decodeParms == "Identity")
|
|
|
|
|
</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>LZW compression is used</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<!-- <rule object="CosUnicodeName">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.8" testNumber="1"/>
|
|
|
|
|
<description>Font names, names of colourants in Separation and DeviceN colour spaces, and structure type names, after expansion of character sequences escaped with
|
|
|
|
|
a NUMBER SIGN (23h), if any, shall be valid UTF-8 character sequences.</description>
|
|
|
|
|
<test>isValidUtf8 == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The name object does not represent a correct Utf8 byte sequence</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="7.3.5"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule> -->
|
|
|
|
|
<rule object="CosIndirect">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.9" testNumber="1"/>
|
|
|
|
|
<description>The object number and generation number shall be separated by a single white-space character. The generation number and obj keyword shall be
|
|
|
|
|
separated by a single white-space character. The object number and endobj keyword shall each be preceded by an EOL marker. The obj and endobj
|
|
|
|
|
keywords shall each be followed by an EOL marker.</description>
|
|
|
|
|
<test>spacingCompliesPDFA</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Spacings of object number and generation number or keywords 'obj' and 'endobj' do not comply PDF/A specification</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosIIFilter">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.10" testNumber="1"/>
|
|
|
|
|
<description>The value of the F key in the Inline Image dictionary shall not be LZW, LZWDecode, Crypt, a value not listed in ISO 32000-1:2008, Table 6,
|
|
|
|
|
or an array containing any such value.</description>
|
|
|
|
|
<test>
|
|
|
|
|
internalRepresentation == "ASCIIHexDecode" || internalRepresentation == "ASCII85Decode" ||
|
|
|
|
|
internalRepresentation == "FlateDecode" || internalRepresentation == "RunLengthDecode" ||
|
|
|
|
|
internalRepresentation == "CCITTFaxDecode" || internalRepresentation == "DCTDecode" ||
|
|
|
|
|
internalRepresentation == "AHx" || internalRepresentation == "A85" ||
|
|
|
|
|
internalRepresentation == "Fl" || internalRepresentation == "RL" ||
|
|
|
|
|
internalRepresentation == "CCF" || internalRepresentation == "DCT"
|
|
|
|
|
</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Inline image uses LZW, Crypt or one of the unknown filters</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDPerms">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.12" testNumber="1"/>
|
|
|
|
|
<description>No keys other than UR3 and DocMDP shall be present in a permissions dictionary (ISO 32000-1:2008, 12.8.4, Table 258).</description>
|
|
|
|
|
<test>containsOtherEntries == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document permissions dictionary contains keys other than UR3 and DocMDP</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 32000-1:2008" clause="12.8.4"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDSigRef">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.12" testNumber="2"/>
|
|
|
|
|
<description>If DocMDP is present, then the Signature References dictionary (ISO 32000-1:2008, 12.8.1, Table 253)
|
|
|
|
|
shall not contain the keys DigestLocation, DigestMethod, and DigestValue.</description>
|
|
|
|
|
<test>permsContainDocMDP == false || containsDigestEntries == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The Signature References dictionary contains one of the keys DigestLocation, DigestMethod, or DigestValue in presence of DocMDP entry in the permissions dictionary.</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 32000-1:2008" clause="12.8.1"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosInteger">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="1"/>
|
|
|
|
|
<description>A conforming file shall not contain any integer greater than 2147483647. A conforming file shall not contain any integer less than -2147483648.</description>
|
|
|
|
|
<test>(intValue <= 2147483647) && (intValue >= -2147483648)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Integer value out of range</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosReal">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="2"/>
|
|
|
|
|
<description>A conforming file shall not contain any real number outside the range of +/-3.403 x 10^38</description>
|
|
|
|
|
<test>(realValue >= -3.403e+38) && (realValue <= 3.403e+38)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Real value out of range</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosString">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="3"/>
|
|
|
|
|
<description>A conforming file shall not contain any string longer than 32767 bytes.</description>
|
|
|
|
|
<test>value.length() < 32768</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Maximum length of a String (32767) exceeded</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosName">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="4"/>
|
|
|
|
|
<description>A conforming file shall not contain any name longer than 127 bytes.</description>
|
|
|
|
|
<test>internalRepresentation.length() <= 127</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Maximum length of a Name (127) exceeded</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosReal">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="5"/>
|
|
|
|
|
<description>A conforming file shall not contain any real number closer to zero than +/-1.175 x 10^(-38).</description>
|
|
|
|
|
<test>realValue == 0.0 || (realValue <= -1.175e-38) || (realValue >= 1.175e-38)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Non-zero real value is too close to 0.0</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="7"/>
|
|
|
|
|
<description>A conforming file shall not contain more than 8388607 indirect objects</description>
|
|
|
|
|
<test>nrIndirects <= 8388607</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Maximum number of indirect objects (8,388,607) in a PDF file exceeded</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="Op_q_gsave">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="8"/>
|
|
|
|
|
<description>A conforming file shall not nest q/Q pairs by more than 28 nesting levels</description>
|
|
|
|
|
<test>nestingLevel <= 28</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Maximum depth of graphics state nesting (q and Q operators) is exceeded</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDDeviceN">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="9"/>
|
|
|
|
|
<description>A conforming file shall not contain a DeviceN colour space with more than 32 colourants.</description>
|
|
|
|
|
<test>nrComponents <= 32</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Maximum number of DeviceN components (32) is exceeded</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CMapFile">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="10"/>
|
|
|
|
|
<description>A conforming file shall not contain a CID value greater than 65535.</description>
|
|
|
|
|
<test>maximalCID <= 65535</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Maximum value of a CID (65535) is exceeded</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosBBox">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.1.13" testNumber="11"/>
|
|
|
|
|
<description>The size of any of the page boundaries described in ISO 32000-1:2008, 14.11.2 shall not be less than 3 units
|
|
|
|
|
in either direction, nor shall it be greater than 14 400 units in either direction.</description>
|
|
|
|
|
<test>Math.abs(top - bottom) >= 3 && Math.abs(top - bottom) <= 14400 && Math.abs(right - left) >= 3 && Math.abs(right - left) <= 14400</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>One of the bage boundaries is out of range (3-14400) in one of the directions</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="Op_Undefined">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.2" testNumber="1"/>
|
|
|
|
|
<description>Content streams shall not contain any operators not defined in ISO 32000-1 even if such operators are bracketed
|
|
|
|
|
by the BX/EX compatibility operators.</description>
|
|
|
|
|
<test>false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A content stream contains an operator not defined in ISO 32000-1</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDResource">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.2" testNumber="2"/>
|
|
|
|
|
<description>A content stream that references other objects, such as images and fonts that are necessary to fully render or
|
|
|
|
|
process the stream, shall have an explicitly associated Resources dictionary as described in ISO 32000-1:2008, 7.8.3.</description>
|
|
|
|
|
<test>isInherited == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A content stream refers to resources not defined in an explicitly associated Resources dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 32000-1:2008" clause="7.8.3"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="ICCOutputProfile">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.3" testNumber="1"/>
|
|
|
|
|
<description>The profile stream that is the value of the DestOutputProfile key shall either be an output profile (Device Class = "prtr") or a monitor profile
|
|
|
|
|
(Device Class = "mntr"). The profiles shall have a colour space of either "GRAY", "RGB", or "CMYK".</description>
|
|
|
|
|
<test>(deviceClass == "prtr" || deviceClass == "mntr") && (colorSpace == "RGB " || colorSpace == "CMYK" || colorSpace == "GRAY") && version < 5.0</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The embedded PDF/A Output Intent colour profile has invalid header</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="14.11.5"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDOutputIntent">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.3" testNumber="2"/>
|
|
|
|
|
<description>If a file's OutputIntents array contains more than one entry, as might be the case where a file is compliant
|
|
|
|
|
with this part of ISO 19005 and at the same time with PDF/X-4 or PDF/E-1, then all entries that contain a
|
|
|
|
|
DestOutputProfile key shall have as the value of that key the same indirect object, which shall be a valid ICC
|
|
|
|
|
profile stream.</description>
|
|
|
|
|
<test>destOutputProfileIndirect == null || gOutputProfileIndirect == null || destOutputProfileIndirect == gOutputProfileIndirect</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>File's OutputIntents array contains output intent dictionaries with non-matching destination output profiles</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDOutputIntent">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.3" testNumber="3"/>
|
|
|
|
|
<description>In addition, the DestOutputProfileRef key, as defined in ISO 15930-7:2010, Annex A, shall not be present in any PDF/X OutputIntent.</description>
|
|
|
|
|
<test>S != 'GTS_PDFX' || containsDestOutputProfileRef == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The output intent dictionary contains forbidden entry DestOutputProfileRef</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO15930-7:2010" clause="Annex A"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="ICCInputProfile">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.4.2" testNumber="1"/>
|
|
|
|
|
<description>The profile that forms the stream of an ICCBased colour space shall conform to ICC.1:1998-09, ICC.1:2001-12, ICC.1:2003-09 or ISO 15076-1.</description>
|
|
|
|
|
<test>(deviceClass == "prtr" || deviceClass == "mntr" || deviceClass == "scnr" || deviceClass == "spac") &&
|
|
|
|
|
(colorSpace == "RGB " || colorSpace == "CMYK" || colorSpace == "GRAY" || colorSpace == "LAB ") && version < 5.0</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The embedded ICC profile is either invalid or does not satisfy PDF 1.7 requirements</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 32000-1:2008" clause="8.6.5.5"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDICCBasedCMYK">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.4.2" testNumber="2"/>
|
|
|
|
|
<description>OOverprint mode (as set by the OPM value in an ExtGState dictionary) shall not be one (1) when an ICCBased CMYK colour space is
|
|
|
|
|
used for stroke and overprinting for stroke is set to true, or when ICCBased CMYK colour space is used for fill and overprinting for
|
|
|
|
|
fill is set to true, or both.</description>
|
|
|
|
|
<test>overprintFlag == false || OPM == 0</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Overprint mode (OPM) is set to 1 when an ICCBased CMYK colour space is used with enabled overprinting</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 32000-1:2008" clause="8.6.7"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDDeviceRGB">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.4.3" testNumber="2"/>
|
|
|
|
|
<description>DeviceRGB shall only be used if a device independent DefaultRGB colour space has been set when the DeviceRGB colour space is used,
|
|
|
|
|
or if the file has a PDF/A OutputIntent that contains an RGB destination profile.</description>
|
|
|
|
|
<test>gOutputCS != null && gOutputCS == "RGB "</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>DeviceRGB colour space is used without RGB output intent profile</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDDeviceCMYK">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.4.3" testNumber="3"/>
|
|
|
|
|
<description>DeviceCMYK shall only be used if a device independent DefaultCMYK colour space has been set or if a DeviceN-based DefaultCMYK colour space
|
|
|
|
|
has been set when the DeviceCMYK colour space is used or the file has a PDF/A OutputIntent that contains a CMYK destination profile.</description>
|
|
|
|
|
<test>gOutputCS != null && gOutputCS == "CMYK"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>DeviceCMYK colour space is used without CMYK output intent profile</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDDeviceGray">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.4.3" testNumber="4"/>
|
|
|
|
|
<description>DeviceGray shall only be used if a device independent DefaultGray colour space has been set when the DeviceGray colour space is used,
|
|
|
|
|
or if a PDF/A OutputIntent is present.</description>
|
|
|
|
|
<test>gOutputCS != null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>DeviceGray colour space is used without output intent profile</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDDeviceN">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.4.4" testNumber="1"/>
|
|
|
|
|
<description>For any spot colour used in a DeviceN or NChannel colour space, an entry in the Colorants dictionary shall be present.</description>
|
|
|
|
|
<test>areColorantsPresent == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A colorant of the DeviceN color space is not defined in the Colorants dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="8.6.6.5, Table 71"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDSeparation">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.4.4" testNumber="2"/>
|
|
|
|
|
<description>All Separation arrays within a single PDF/A-2 file (including those in Colorants dictionaries) that have the
|
|
|
|
|
same name shall have the same tintTransform and alternateSpace. In evaluating equivalence, the PDF
|
|
|
|
|
objects shall be compared, rather than the computational result of the use of those PDF objects. Compression
|
|
|
|
|
and whether or not an object is direct or indirect shall be ignored.</description>
|
|
|
|
|
<test>areTintAndAlternateConsistent == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Several occurrances of a Separation colour space with the same name are not consistent</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDExtGState">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.5" testNumber="1"/>
|
|
|
|
|
<description>An ExtGState dictionary shall not contain the TR key</description>
|
|
|
|
|
<test>TR == null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>An ExtGState dictionary contains the TR key</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDExtGState">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.5" testNumber="2"/>
|
|
|
|
|
<description>An ExtGState dictionary shall not contain the TR2 key with a value other than Default</description>
|
|
|
|
|
<test>TR2 == null || TR2 == "Default"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>An ExtGState dictionary contains the TR2 key with a value other than Default</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDExtGState">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.5" testNumber="3"/>
|
|
|
|
|
<description>An ExtGState dictionary shall not contain the HTP key</description>
|
|
|
|
|
<test>containsHTP == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>An ExtGState dictionary contains the HTP key</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDHalftone">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.5" testNumber="4"/>
|
|
|
|
|
<description>All halftones in a conforming PDF/A-2 file shall have the value 1 or 5 for the HalftoneType key.</description>
|
|
|
|
|
<test>HalftoneType != null && (HalftoneType == 1 || HalftoneType == 5)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A Halftone has type other than 1 or 5</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDHalftone">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.5" testNumber="5"/>
|
|
|
|
|
<description>Halftones in a conforming PDF/A-2 file shall not contain a HalftoneName key.</description>
|
|
|
|
|
<test>HalftoneName == null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A Halftone dictionary contains the HalftoneName key</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDHalftone">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.5" testNumber="6"/>
|
|
|
|
|
<description>The TransferFunction key in a halftone dictionary shall be used only as required by ISO 32000-1.</description>
|
|
|
|
|
<test>colorantName == null || colorantName == 'Default' ||
|
|
|
|
|
( (colorantName == 'Cyan' || colorantName == 'Magenta' || colorantName == 'Yellow' || colorantName == 'Black' || colorantName == 'Red' ||
|
|
|
|
|
colorantName == 'Green' || colorantName == 'Blue') ? TransferFunction == null : TransferFunction != null)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Invalid use of TransferFunction key in the Halftone dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 32000-1:2008" clause="Table 130"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosRenderingIntent">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.6" testNumber="1"/>
|
|
|
|
|
<description>Where a rendering intent is specified, its value shall be one of the four values defined in ISO 32000-1:2008,
|
|
|
|
|
Table 70: RelativeColorimetric, AbsoluteColorimetric, Perceptual or Saturation.</description>
|
|
|
|
|
<test>internalRepresentation == "RelativeColorimetric" || internalRepresentation == "AbsoluteColorimetric" || internalRepresentation == "Perceptual" || internalRepresentation == "Saturation"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A rendering intent with non-standard value is used</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDXImage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.8" testNumber="1"/>
|
|
|
|
|
<description>An Image dictionary shall not contain the Alternates key</description>
|
|
|
|
|
<test>containsAlternates == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Alternates key is present in the Image dictionary(</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDXImage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.8" testNumber="2"/>
|
|
|
|
|
<description>An Image dictionary shall not contain the OPI key</description>
|
|
|
|
|
<test>containsOPI == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>OPI key is present in the XObject dictionary(</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDXImage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.8" testNumber="3"/>
|
|
|
|
|
<description>If an Image dictionary contains the Interpolate key, its value shall be false.
|
|
|
|
|
For an inline image, the I key shall have a value of false.</description>
|
|
|
|
|
<test>Interpolate == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The value of the Interpolate key in the Image dictionary is true</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<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>
|
|
|
|
|
<test>nrColorChannels == 1 || nrColorChannels == 3 || nrColorChannels == 4</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>JPEG2000 image has number of colour channels different from 1, 3 or 4.</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="JPEG2000">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="2"/>
|
|
|
|
|
<description>If the number of colour space specifications in the JPEG2000 data is greater than 1, there shall be exactly one colour space
|
|
|
|
|
specification that has the value 0x01 in the APPROX field.</description>
|
|
|
|
|
<test>nrColorSpaceSpecs == 1 || nrColorSpacesWithApproxField == 1</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The JPEG2000 image contains more than one colour specification with the best colour fidelity (value 0x01 in the APPROX field).</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="JPEG2000">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="3"/>
|
|
|
|
|
<description>The value of the METH entry in its 'colr' box shall be 0x01, 0x02 or 0x03. A conforming reader shall use only
|
|
|
|
|
that colour space and shall ignore all other colour space specifications.</description>
|
|
|
|
|
<test>colrMethod == 1 || colrMethod == 2 || colrMethod == 3</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Colour specification of the JPEG2000 image has specification method.</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="JPEG2000">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="4"/>
|
|
|
|
|
<description>JPEG2000 enumerated colour space 19 (CIEJab) shall not be used.</description>
|
|
|
|
|
<test>colrEnumCS == null || colrEnumCS != 19</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>JPEG2000 image uses enumerated colour space 19 (CIEJab), which is not allowed in PDF/A</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="JPEG2000">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.8.3" testNumber="5"/>
|
|
|
|
|
<description>The bit-depth of the JPEG2000 data shall have a value in the range 1 to 38. All colour channels in the JPEG2000 data shall have the same bit-depth.</description>
|
|
|
|
|
<test>bpccBoxPresent == false && (bitDepth >= 1 && bitDepth <= 38) </test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>JPEG2000 image has invalid bit-depth parameters</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDXForm">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.9" testNumber="1"/>
|
|
|
|
|
<description>A form XObject dictionary shall not contain any of the following: - the OPI key; - the Subtype2 key with a value of PS; - the PS key.</description>
|
|
|
|
|
<test>(Subtype2 == null || Subtype2 != "PS") && containsPS == false && containsOPI == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The form XObject dictionary contains a PS key, or a Subtype2 key with value PS, or an OPI key</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDXForm">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.9" testNumber="2"/>
|
|
|
|
|
<description>A conforming file shall not contain any reference XObjects</description>
|
|
|
|
|
<test>containsRef == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document contains a reference XObject (Ref key in the form XObject dictionary)</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDXObject">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.9" testNumber="3"/>
|
|
|
|
|
<description>A conforming file shall not contain any PostScript XObjects</description>
|
|
|
|
|
<test>Subtype != "PS"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document contains a PostScript XObject</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDExtGState">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.10" testNumber="1"/>
|
|
|
|
|
<description>Only blend modes that are specified in ISO 32000-1:2008 shall be used for the value of the BM key in an extended graphic state dictionary.</description>
|
|
|
|
|
<test>BM == null || BM == "Normal" || BM == "Compatible" || BM == "Multiply" || BM == "Screen" || BM == "Overlay" || BM == "Darken" ||
|
|
|
|
|
BM == "Lighten" || BM == "ColorDodge" || BM == "ColorBurn" || BM == "HardLight" || BM == "SoftLight" || BM == "Difference" || BM == "Exclusion" ||
|
|
|
|
|
BM == "Hue" || BM == "Saturation" || BM == "Color" || BM == "Luminosity"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document uses the blend mode not defined in ISO 32000-1:2008</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="11.3.5, Tables 136-137"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDPage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.10" testNumber="2"/>
|
|
|
|
|
<description>If the document does not contain a PDF/A OutputIntent, then all Page objects
|
|
|
|
|
that contain transparency shall include the Group key, and the attribute dictionary that forms the value of that
|
|
|
|
|
Group key shall include a CS entry whose value shall be used as the default blending colour space.</description>
|
|
|
|
|
<test>gOutputCS != null || containsGroupCS == true || containsTransparency == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The page contains transparent objects with no blending colour space defined.</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="11.3.4"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.2" testNumber="1"/>
|
|
|
|
|
<description>All fonts and font programs used in a conforming file, regardless of rendering mode usage, shall conform to
|
|
|
|
|
the provisions in ISO 32000-1:2008, 9.6 and 9.7, as well as to the font specifications referenced by these provisions.
|
|
|
|
|
Type - name - (Required) The type of PDF object that this dictionary describes; must be Font for a font dictionary</description>
|
|
|
|
|
<test>Type == "Font"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A Font dictionary has missing or invalid Type entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.2.1, Table 111"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.5, Table 112"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.4.1, Table 117"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.6.1, Table 121"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.2" testNumber="2"/>
|
|
|
|
|
<description>All fonts and font programs used in a conforming file, regardless of rendering mode usage, shall conform to the provisions
|
|
|
|
|
in ISO 32000-1:2008, 9.6 and 9.7, as well as to the font specifications referenced by these provisions.
|
|
|
|
|
Subtype - name - (Required) The type of font; must be "Type1" for Type 1 fonts, "MMType1" for multiple master fonts, "TrueType" for TrueType fonts
|
|
|
|
|
"Type3" for Type 3 fonts, "Type0" for Type 0 fonts and "CIDFontType0" or "CIDFontType2" for CID fonts</description>
|
|
|
|
|
<test>Subtype == "Type1" || Subtype == "MMType1" || Subtype == "TrueType" || Subtype == "Type3" || Subtype == "Type0"
|
|
|
|
|
|| Subtype == "CIDFontType0" || Subtype == "CIDFontType2"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A Font dictionary has missing or invalid Subtype entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.2.1, Table 111"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.2.3"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.3"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.5, Table 112"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.4.1, Table 117"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.6.1, Table 121"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.2" testNumber="3"/>
|
|
|
|
|
<description>All fonts and font programs used in a conforming file, regardless of rendering mode usage, shall conform to the provisions
|
|
|
|
|
in ISO 32000-1:2008, 9.6 and 9.7, as well as to the font specifications referenced by these provisions.
|
|
|
|
|
BaseFont - name - (Required) The PostScript name of the font</description>
|
|
|
|
|
<test>Subtype == "Type3" || fontName != null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A BaseFont entry is missing or has invalid type</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.2.1, Table 111"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.4.1, Table 117"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.6.1, Table 121"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDSimpleFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.2" testNumber="4"/>
|
|
|
|
|
<description>All fonts and font programs used in a conforming file, regardless of rendering mode usage, shall conform to the provisions
|
|
|
|
|
in ISO 32000-1:2008, 9.6 and 9.7, as well as to the font specifications referenced by these provisions.
|
|
|
|
|
FirstChar - integer - (Required except for the standard 14 fonts) The first character code defined in the font's Widths array</description>
|
|
|
|
|
<test>isStandard == true || FirstChar != null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A non-standard simple font dictionary has missing or invalid FirstChar entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.2.1, Table 111"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.5, Table 112"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDSimpleFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.2" testNumber="5"/>
|
|
|
|
|
<description>All fonts and font programs used in a conforming file, regardless of rendering mode usage, shall conform to the provisions
|
|
|
|
|
in ISO 32000-1:2008, 9.6 and 9.7, as well as to the font specifications referenced by these provisions.
|
|
|
|
|
FirstChar - integer - (Required except for the standard 14 fonts) The first character code defined in the font's Widths array</description>
|
|
|
|
|
<test>isStandard == true || LastChar != null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A non-standard simple font dictionary has missing or invalid LastChar entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.2.1, Table 111"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.5, Table 112"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDSimpleFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.2" testNumber="6"/>
|
|
|
|
|
<description>All fonts and font programs used in a conforming file, regardless of rendering mode usage, shall conform to the provisions
|
|
|
|
|
in ISO 32000-1:2008, 9.6 and 9.7, as well as to the font specifications referenced by these provisions.
|
|
|
|
|
Widths - array - (Required except for the standard 14 fonts; indirect reference preferred) An array of (LastChar − FirstChar + 1) widths</description>
|
|
|
|
|
<test>isStandard == true || (Widths_size != null && Widths_size == LastChar - FirstChar + 1)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Widths array is missing or has invalid size</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.2.1, Table 111"/>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.6.5, Table 112"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.2" testNumber="7"/>
|
|
|
|
|
<description>All fonts used in a conforming file shall conform to the font specifications defined in PDF Reference 5.5.
|
|
|
|
|
The subtype is the value of the Subtype key, if present, in the font file stream dictionary. The only valid values of this key in PDF 1.4 are
|
|
|
|
|
Type1C - Type 1–equivalent font program represented in the Compact Font Format (CFF), CIDFontType0C - Type 0 CIDFont program represented
|
|
|
|
|
in the Compact Font Format (CFF) and OpenType - OpenType® font program, as described in the OpenType Specification v.1.4.</description>
|
|
|
|
|
<test>fontFileSubtype == null || fontFileSubtype == "Type1C" || fontFileSubtype == "CIDFontType0C" || fontFileSubtype == "OpenType"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Unsupported font file format of the embedded font</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.9, Table 126"/>
|
|
|
|
|
<reference specification="Adobe Technical Note #5176, The Compact Font Format Specification" clause=""/>
|
|
|
|
|
<reference specification="OpenType Font Specification 1.4, December 2004, Microsoft" clause=""/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDType0Font">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.3" testNumber="1"/>
|
|
|
|
|
<description>For any given composite (Type 0) font within a conforming file, the CIDSystemInfo entry in its CIDFont dictionary and its Encoding dictionary
|
|
|
|
|
shall have the following relationship:
|
|
|
|
|
- If the Encoding key in the Type 0 font dictionary is Identity-H or Identity-V, any values of Registry, Ordering,
|
|
|
|
|
and Supplement may be used in the CIDSystemInfo entry of the CIDFont.
|
|
|
|
|
- Otherwise, the corresponding Registry and Ordering strings in both CIDSystemInfo dictionaries shall be identical, and the value of the Supplement key in
|
|
|
|
|
the CIDSystemInfo dictionary of the CIDFont shall be greater than or equal to the Supplement key in the CIDSystemInfo dictionary of the CMap.</description>
|
|
|
|
|
<test>cmapName == "Identity-H" || cmapName == "Identity-V" || (areRegistryOrderingCompatible == true && isSupplementCompatible == true)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>CiDSystemInfo entries the CIDFont and CMap dictionaries of a Type 0 font are not compatible</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDCIDFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.3" testNumber="2"/>
|
|
|
|
|
<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>
|
|
|
|
|
<test>Subtype != "CIDFontType2" || CIDToGIDMap != null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A Type 2 CIDFont dictionary has missing or invalid CIDToGIDMap entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.4, Table 117"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDCMap">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.3" testNumber="3"/>
|
|
|
|
|
<description>All CMaps used within a PDF/A-2 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>
|
|
|
|
|
<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>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A non-standard CMap is not embedded</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.5.2, Table 118"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CMapFile">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.3" testNumber="4"/>
|
|
|
|
|
<description>For those CMaps that are embedded, the integer value of the WMode entry in the CMap dictionary shall be identical to the WMode value
|
|
|
|
|
in the embedded CMap stream.</description>
|
|
|
|
|
<test>WMode == dictWMode</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>WMode entry in the embedded CMap and in the CMap dictionary are not identical</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDReferencedCMap">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.3" testNumber="5"/>
|
|
|
|
|
<description>A CMap shall not reference any other CMap except those listed in ISO 32000-1:2008, 9.7.5.2, Table 118.</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"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A CMap references another non-standard CMap</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.7.5.2, Table 118"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.4" 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-1:2008, 9.9.</description>
|
|
|
|
|
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The font program is not embedded</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="9.9"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="Glyph">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.4" testNumber="2"/>
|
|
|
|
|
<description>Embedded fonts shall define all glyphs referenced for rendering within the conforming file. A font referenced for use solely
|
|
|
|
|
in rendering mode 3 is therefore not rendered and is thus exempt from the embedding requirement.</description>
|
|
|
|
|
<test>renderingMode == 3 || isGlyphPresent == null || isGlyphPresent == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Not all glyphs referenced for rendering are present in the embedded font program</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<!-- <rule object="PDType1Font">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.4" testNumber="3"/>
|
|
|
|
|
<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>
|
|
|
|
|
<test>fontFile_size == 0 || fontName.search(/[A-Z]{6}\+/) != 0 || CharSet == null || charSetListsAllGlyphs == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A CharSet entry in the Descriptor dictionary of a Type1 font incorrectly lists glyphs present in the font program</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDCIDFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.4" testNumber="4"/>
|
|
|
|
|
<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>
|
|
|
|
|
<test>fontFile_size == 0 || fontName.search(/[A-Z]{6}\+/) != 0 || CIDSet_size == 0 || cidSetListsAllGlyphs == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A CID Font subset does not define CIDSet entry in its Descriptor dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule> -->
|
|
|
|
|
<rule object="Glyph">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.5" testNumber="1"/>
|
|
|
|
|
<description>For every font embedded in a conforming file and used for rendering, the glyph width information in the font dictionary and in the embedded
|
|
|
|
|
font program shall be consistent.</description>
|
|
|
|
|
<test>renderingMode == 3 || isWidthConsistent == null || isWidthConsistent == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Glyph width information in the embedded font program is not consistent with the Widths entry of the font dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="TrueTypeFontProgram">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.6" testNumber="1"/>
|
|
|
|
|
<description>For all non-symbolic TrueType fonts used for rendering, the embedded TrueType font program shall contain one or several non-symbolic
|
|
|
|
|
cmap entries such that all necessary glyph lookups can be carried out.</description>
|
|
|
|
|
<test>isSymbolic == true || renderingMode == 3 || cmap10Present == true || cmap31Present == true </test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The embedded font program for a non-symbolic TrueType font does not contain any cmap subtables</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDTrueTypeFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.6" testNumber="2"/>
|
|
|
|
|
<description>No non-symbolic TrueType font shall define a Differences array unless all of the glyph names in
|
|
|
|
|
the Differences array are listed in the Adobe Glyph List and the embedded font program contains at least the
|
|
|
|
|
Microsoft Unicode (3,1 – Platform ID=3, Encoding ID=1) encoding in the 'cmap' table.</description>
|
|
|
|
|
<test>isSymbolic == true || (Encoding == "MacRomanEncoding" || Encoding == "WinAnsiEncoding") ||
|
|
|
|
|
(Encoding == "Custom" && differencesAreUnicodeCompliant == true)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A non-symbolic TrueType font has encoding different from MacRomanEncoding or WinAnsiEncoding, or
|
|
|
|
|
the glyphs in the Differences array can not be mapped to the embedded font glyphs via the Adobe Glyph List</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDTrueTypeFont">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.6" testNumber="3"/>
|
|
|
|
|
<description>Symbolic TrueType fonts shall not contain an Encoding entry in the font dictionary</description>
|
|
|
|
|
<test>isSymbolic == false || Encoding == null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A symbolic TrueType font specifies an Encoding entry in its dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="TrueTypeFontProgram">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.6" testNumber="4"/>
|
|
|
|
|
<description>Symbolic TrueType fonts shall not contain an Encoding entry in the font dictionary, and the 'cmap' table in the embedded font program
|
|
|
|
|
shall either contain exactly one encoding or it shall contain, at least, the Microsoft Symbol (3,0 – Platform ID=3, Encoding ID=0) encoding.</description>
|
|
|
|
|
<test>isSymbolic == false || nrCmaps == 1 || cmap30Present == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The embedded font program for a symbolic TrueType font contains more than one cmap subtable</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="Glyph">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.7" testNumber="1"/>
|
|
|
|
|
<description>The Font dictionary of all fonts shall define the map of all used character codes to Unicode values, either via a ToUnicode entry,
|
|
|
|
|
or other mechanisms as defined in ISO 19005-2, 6.2.11.7.2.</description>
|
|
|
|
|
<test>toUnicode != null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The glyph can not be mapped to Unicode</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 19005-2:2011" clause="6.2.11.7.2"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<!-- <rule object="Glyph"> -->
|
|
|
|
|
<!-- <id specification="ISO_19005_2" clause="6.2.11.7" testNumber="2"/> -->
|
|
|
|
|
<!-- <description>The Unicode values specified in the ToUnicode CMap shall all be greater than zero (0), but not equal to either U+FEFF or U+FFFE.</description> -->
|
|
|
|
|
<!-- <test>toUnicode == null || (toUnicode.indexOf("\u0000") == -1 && toUnicode.indexOf("\uFFFE") == -1 && toUnicode.indexOf("\uFEFF") == -1)</test> -->
|
|
|
|
|
<!-- <error> -->
|
|
|
|
|
<!-- <message>The glyph has an invalid Unicode value</message> -->
|
|
|
|
|
<!-- <arguments/> -->
|
|
|
|
|
<!-- </error> -->
|
|
|
|
|
<!-- <references/> -->
|
|
|
|
|
<!-- </rule> -->
|
|
|
|
|
<rule object="Glyph">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.2.11.8" testNumber="1"/>
|
|
|
|
|
<description>A PDF/A-2 compliant document shall not contain a reference to the .notdef glyph from any of the text showing
|
|
|
|
|
operators, regardless of text rendering mode, in any content stream.</description>
|
|
|
|
|
<test>name != ".notdef"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document contains a reference to the .notdef glyph</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAnnot">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.3.1" testNumber="1"/>
|
|
|
|
|
<description>Annotation types not defined in ISO 32000-1 shall not be permitted. Additionally, the 3D, Sound, Screen and Movie types shall not be permitted.</description>
|
|
|
|
|
<test>Subtype == "Text" || Subtype == "Link" || Subtype == "FreeText" || Subtype == "Line" ||
|
|
|
|
|
Subtype == "Square" || Subtype == "Circle" || Subtype == "Polygon" || Subtype == "PolyLine" ||
|
|
|
|
|
Subtype == "Highlight" || Subtype == "Underline" || Subtype == "Squiggly" || Subtype == "StrikeOut" ||
|
|
|
|
|
Subtype == "Stamp" || Subtype == "Caret" || Subtype == "Ink" || Subtype == "Popup" ||
|
|
|
|
|
Subtype == "FileAttachment" || Subtype == "Widget" || Subtype == "PrinterMark" || Subtype == "TrapNet" ||
|
|
|
|
|
Subtype == "Watermark" || Subtype == "Redact"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Unknown or not permitted annotation type</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="PDF 1.4 Reference" clause="12.5.6.1, Table 169"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAnnot">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.3.2" testNumber="1"/>
|
|
|
|
|
<description>Except for annotation dictionaries whose Subtype value is Popup, all annotation dictionaries shall contain the F key.</description>
|
|
|
|
|
<test>Subtype == "Popup" || F != null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A dictionary of a non-Popup annotation does not contain F key</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAnnot">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.3.2" testNumber="2"/>
|
|
|
|
|
<description>If present, the F key's Print flag bit shall be set to 1 and its Hidden, Invisible, ToggleNoView, and NoView flag bits shall be set to 0.</description>
|
|
|
|
|
<test>F == null || ((F & 1) == 0 && (F & 2) == 0 && (F & 4) == 4 && (F & 32) == 0 && (F & 256) == 0)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>One of the annotation flags Hidden, Invisible, ToggleNoView, or NoView is set to 1, or the Print flag is set to 0</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAnnot">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.3.3" testNumber="1"/>
|
|
|
|
|
<description>Every annotation (including those whose Subtype value is Widget, as used for form fields), except for the two cases listed below,
|
|
|
|
|
shall have at least one appearance dictionary:
|
|
|
|
|
- annotations where the value of the Rect key consists of an array where value 1 is equal to value 3 and value 2 is equal to value 4;
|
|
|
|
|
- annotations whose Subtype value is Popup or Link.</description>
|
|
|
|
|
<test>(width == 0 && height ==0) || Subtype == "Popup" || Subtype == "Link" || AP != null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>An annotation does not contain an appearance dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAnnot">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.3.3" testNumber="2"/>
|
|
|
|
|
<description>For all annotation dictionaries containing an AP key, the appearance dictionary that it defines as its value shall
|
|
|
|
|
contain only the N key. If an annotation dictionary's Subtype key has a value of Widget and its FT key has a
|
|
|
|
|
value of Btn, the value of the N key shall be an appearance subdictionary, otherwise the value of the N key shall be an appearance stream.</description>
|
|
|
|
|
<test>AP == null || ( AP == "N" && ( ((Subtype != "Widget" || FT != "Btn") && N_type == "Stream")
|
|
|
|
|
|| (Subtype == "Widget" && FT == "Btn" && N_type == "Dict") ) )</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Annotation's appearance dictionary contains entries other than N or the N entry has an invalid type</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAnnot">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.4.1" testNumber="1"/>
|
|
|
|
|
<description>A Widget annotation dictionary or Field dictionary shall not contain the A or AA keys.</description>
|
|
|
|
|
<test>Subtype != "Widget" || (containsA == false && containsAA == false)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A Widget annotation contains either A or AA entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDFormField">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.4.1" testNumber="2"/>
|
|
|
|
|
<description>A Widget annotation dictionary or Field dictionary shall not contain the A or AA keys.</description>
|
|
|
|
|
<test>containsAA == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A Form field dictionary contains the AA entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAcroForm">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.4.1" testNumber="3"/>
|
|
|
|
|
<description>The NeedAppearances flag of the interactive form dictionary shall either not be present or shall be false.</description>
|
|
|
|
|
<test>NeedAppearances == null || NeedAppearances == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The interactive form dictionary contains the NeedAppearances flag with value true</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAcroForm">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.4.2" testNumber="1"/>
|
|
|
|
|
<description>The document's interactive form dictionary that forms the value of the AcroForm key in the document's Catalog of a PDF/A-2 file,
|
|
|
|
|
if present, shall not contain the XFA key.</description>
|
|
|
|
|
<test>containsXFA == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The interactive form dictionary contains the XFA key</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.4.2" testNumber="2"/>
|
|
|
|
|
<description>A document's Catalog shall not contain the NeedsRendering key.</description>
|
|
|
|
|
<test>NeedsRendering == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A document's Catalog contains NeedsRendering flag set to true</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDSignature">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.4.3" testNumber="1"/>
|
|
|
|
|
<description>When computing the digest for the file, it shall be computed over the entire file, including the signature
|
|
|
|
|
dictionary but excluding the PDF Signature itself.</description>
|
|
|
|
|
<test>doesByteRangeCoverEntireDocument == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>ByteRanbe array of the digital signature does not cover the entire file (excluding the PDF Signature itself)</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 19005-2:2011" clause="Annex B"/>
|
|
|
|
|
<reference specification="ISO 32000-1:2008" clause="12.8.1"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PKCSDataObject">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.4.3" testNumber="2"/>
|
|
|
|
|
<description>The PDF Signature (a DER-encoded PKCS#7 binary data object) shall be placed into the Contents entry of
|
|
|
|
|
the signature dictionary. The PKCS#7 object shall conform to the PKCS#7 specification in RFC 2315. At
|
|
|
|
|
minimum, it shall include the signer's X.509 signing certificate and there shall only be a single signer (e.g.
|
|
|
|
|
a single "SignerInfo" structure) in the PDF Signature.</description>
|
|
|
|
|
<test>signingCertificatePresent == true && SignerInfoCount == 1</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The DER-encoded PKCS#7 binary data object representing a PDF Signature does not conform to PDF/A-2 requirements</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 19005-2:2011" clause="Annex B"/>
|
|
|
|
|
<reference specification="RFC 2315" clause=""/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDAction">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.5.1" testNumber="1"/>
|
|
|
|
|
<description>The Launch, Sound, Movie, ResetForm, ImportData, Hide, SetOCGState, Rendition, Trans, GoTo3DView and JavaScript actions shall not be permitted.
|
|
|
|
|
Additionally, the deprecated set-state and noop actions shall not be permitted.</description>
|
|
|
|
|
<test>S == "GoTo" || S == "GoToR" || S == "GotToE" || S == "Thread" || S == "URI" || S == "Named" || S == "SubmitForm"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Unknown or not permitted action type</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="12.6.4.1, Table 198"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDNamedAction">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.5.1" testNumber="2"/>
|
|
|
|
|
<description>Named actions other than NextPage, PrevPage, FirstPage, and LastPage shall not be permitted.</description>
|
|
|
|
|
<test>N == "NextPage" || N == "PrevPage" || N == "FirstPage" || N == "LastPage"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Unknown or not permitted named action</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO32000-1:2008" clause="12.6.4.11, Table 211"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.5.2" testNumber="1"/>
|
|
|
|
|
<description>The document's Catalog shall not include an AA entry for an additional-actions dictionary.</description>
|
|
|
|
|
<test>containsAA == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document catalog dictionary contains an additional-actions dictionary (AA entry)</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDPage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.5.2" testNumber="2"/>
|
|
|
|
|
<description>The Page dictionary shall not include an AA entry for an additional-actions dictionary.</description>
|
|
|
|
|
<test>containsAA == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The Page dictionary contains an additional-actions dictionary (AA entry)</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.1" testNumber="1"/>
|
|
|
|
|
<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.</description>
|
|
|
|
|
<test>metadata_size == 1</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document catalog dictionary doesn't contain metadata key.</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="ISO 32000-1" clause="14.3.2"/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="XMPPackage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.1" testNumber="2"/>
|
|
|
|
|
<description>The bytes attribute shall not be used in the header of an XMP packet.</description>
|
|
|
|
|
<test>bytes == null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The XMP Package contains bytes attribute.</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="XMPPackage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.1" testNumber="3"/>
|
|
|
|
|
<description>The encoding attribute shall not be used in the header of an XMP packet.</description>
|
|
|
|
|
<test>encoding == null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The XMP Package contains encoding attribute.</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="XMPPackage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.1" testNumber="4"/>
|
|
|
|
|
<description>All metadata streams present in the PDF shall conform to the XMP Specification. All content of all XMP packets shall be well-formed,
|
|
|
|
|
as defined by Extensible Markup Language (XML) 1.0 (Third Edition), 2.1, and the RDF/XML Syntax Specification (Revised).</description>
|
|
|
|
|
<test>isSerializationValid</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>%1</message>
|
|
|
|
|
<arguments>
|
|
|
|
|
<argument>errorMessage</argument>
|
|
|
|
|
</arguments>
|
|
|
|
|
</error>
|
|
|
|
|
<references>
|
|
|
|
|
<reference specification="XMP Specification September 2005" clause=""/>
|
|
|
|
|
<reference specification="Extensible Markup Language (XML) 1.0 (Third Edition), 04 February 2004" clause="2.1"/>
|
|
|
|
|
<reference specification="RDF/XML Syntax Specification (Revised), 10 February 2004" clause=""/>
|
|
|
|
|
</references>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="ExtensionSchemaObject">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.3" testNumber="1"/>
|
|
|
|
|
<description>Extension schemas shall be specified using the PDF/A extension schema container schema defined in 6.6.2.3.3. All fields described in each
|
|
|
|
|
of the tables in 6.6.2.3.3 shall be present in any extension schema container schema.</description>
|
|
|
|
|
<test>containsUndefinedFields == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>An extension schema object contains fields not defined by the specification</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="ExtensionSchemasContainer">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.3" testNumber="2"/>
|
|
|
|
|
<description>The extension schema container schema uses the namespace URI "http://www.aiim.org/pdfa/ns/extension/".
|
|
|
|
|
The required schema namespace prefix is pdfaExtension. pdfaExtension:schemas - Bag Schema - Description of extension schemas</description>
|
|
|
|
|
<test>isValidBag == true && prefix == "pdfaExtension"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Invalid syntax of the extension schema container</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="ExtensionSchemaDefinition">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.3" testNumber="3"/>
|
|
|
|
|
<description>The Schema type is an XMP structure containing the definition of an extension schema. The field namespace URI is "http://www.aiim.org/pdfa/ns/schema#".
|
|
|
|
|
The required field namespace prefix is pdfaSchema. The Schema type includes the following fields: pdfaSchema:schema (Text), pdfaSchema:namespaceURI (URI), pdfaSchema:prefix (Text),
|
|
|
|
|
pdfaSchema:property (Seq Property), pdfaSchema:valueType (Seq ValueType).</description>
|
|
|
|
|
<test>(isSchemaValidText == true && schemaPrefix == "pdfaSchema") &&
|
|
|
|
|
(isNamespaceURIValidURI == true && namespaceURIPrefix == "pdfaSchema") &&
|
|
|
|
|
(isPrefixValidText == true && prefixPrefix == "pdfaSchema") &&
|
|
|
|
|
(isPropertyValidSeq == true && propertyPrefix == "pdfaSchema") &&
|
|
|
|
|
(isValueTypeValidSeq == true && (valueTypePrefix == null || valueTypePrefix == "pdfaSchema") )</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Invalid Extension Schema definition</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="ExtensionSchemaProperty">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.3" testNumber="4"/>
|
|
|
|
|
<description>The Property type defined is an XMP structure containing the definition of a schema property. The
|
|
|
|
|
field namespace URI is "http://www.aiim.org/pdfa/ns/property#". The required field namespace prefix is
|
|
|
|
|
pdfaProperty. The Property type includes the following fields: pdfaProperty:name (Text), pdfaProperty:valueType (Open Choice of Text),
|
|
|
|
|
pdfaProperty:category (Closed Choice of Text), pdfaProperty:description (Text).</description>
|
|
|
|
|
<test>(isNameValidText == true && namePrefix == "pdfaProperty" ) &&
|
|
|
|
|
(isValueTypeValidText == true && isValueTypeDefined == true && valueTypePrefix == "pdfaProperty" ) &&
|
|
|
|
|
(isCategoryValidText == true && (category == "external" || category == "internal") && categoryPrefix == "pdfaProperty") &&
|
|
|
|
|
(isDescriptionValidText == true && descriptionPrefix == "pdfaProperty" )</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Invalid extension schema Property type definition</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="ExtensionSchemaValueType">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.3" testNumber="5"/>
|
|
|
|
|
<description>The ValueType type is an XMP structure containing the definition of all property value
|
|
|
|
|
types used by embedded extension schemas that are not defined in the XMP Specification. The field namespace URI is "http://www.aiim.org/pdfa/ns/type#".
|
|
|
|
|
The required field namespace prefix is pdfaType. The ValueType type includes the following fields: pdfaType:type (Text), pdfaType:namespaceURI (URI),
|
|
|
|
|
pdfaType:prefix (Text), pdfaType:description (Text), pdfaType:field (Seq Field).</description>
|
|
|
|
|
<test>(isTypeValidText == true && typePrefix == "pdfaType") &&
|
|
|
|
|
(isNamespaceURIValidURI == true && namespaceURIPrefix == "pdfaType") &&
|
|
|
|
|
(isPrefixValidText == true && prefixPrefix == "pdfaType") &&
|
|
|
|
|
(isDescriptionValidText == true && descriptionPrefix == "pdfaType") &&
|
|
|
|
|
(isFieldValidSeq == true && (fieldPrefix == null || fieldPrefix == "pdfaType") )</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Invalid extension schema ValueType type definition</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="ExtensionSchemaField">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.3" testNumber="6"/>
|
|
|
|
|
<description>The Field type defined in Table 6 is an XMP structure containing the definition of a property value type field. The field
|
|
|
|
|
namespace URI is "http://www.aiim.org/pdfa/ns/field#". The required field namespace prefix is pdfaField. The Field type contains the following fields:
|
|
|
|
|
pdfaField:name (Text), pdfaField:valueType (Open Choice of Text), pdfaField:description (Text).</description>
|
|
|
|
|
<test>(isNameValidText == true && namePrefix == "pdfaField" ) &&
|
|
|
|
|
(isValueTypeValidText == true && isValueTypeDefined == true && valueTypePrefix == "pdfaField" ) &&
|
|
|
|
|
(isDescriptionValidText == true && descriptionPrefix == "pdfaField" )</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Invalid extension schema Field type definition</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="XMPProperty">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.2.3" testNumber="7"/>
|
|
|
|
|
<description>All properties specified in XMP form shall use either the predefined schemas defined in the XMP Specification,
|
|
|
|
|
ISO 19005-1 or this part of ISO 19005, or any extension schemas that comply with 6.6.2.3.2.</description>
|
|
|
|
|
<test>(isPredefinedInXMP2005 == true || isDefinedInMainPackage == true || isDefinedInCurrentPackage == true) && isValueTypeCorrect == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>%1</message>
|
|
|
|
|
<arguments>
|
|
|
|
|
<argument>errorMessage</argument>
|
|
|
|
|
</arguments>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<!-- <rule object="MainXMPPackage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.4" testNumber="1"/>
|
|
|
|
|
<description>The PDF/A version and conformance level of a file shall be specified using the PDF/A Identification extension schema.</description>
|
|
|
|
|
<test>Identification_size == 1</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document metadata stream doesn't contains PDF/A Identification Schema.</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDFAIdentification">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.4" testNumber="2"/>
|
|
|
|
|
<description>The value of pdfaid:part shall be the part number of ISO 19005 to which the file conforms.</description>
|
|
|
|
|
<test>part == 2</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The "part" property of the PDF/A Identification Schema is %1 instead of 2 for PDF/A-2 conforming file.</message>
|
|
|
|
|
<arguments>
|
|
|
|
|
<argument>part</argument>
|
|
|
|
|
</arguments>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDFAIdentification">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.4" testNumber="3"/>
|
|
|
|
|
<description>A Level A conforming file shall specify the value of pdfaid:conformance as A. A Level B conforming file shall specify the value of
|
|
|
|
|
pdfaid:conformance as B. A Level U conforming file shall specify the value of pdfaid:conformance as U.</description>
|
|
|
|
|
<test>conformance == "U" || conformance == "A"</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The "conformance" property of the PDF/A Identification Schema is %1 instead of "U" for PDF/A-2U conforming file.</message>
|
|
|
|
|
<arguments>
|
|
|
|
|
<argument>conformance</argument>
|
|
|
|
|
</arguments>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule> -->
|
|
|
|
|
<rule object="PDFAIdentification">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.6.4" testNumber="4"/>
|
|
|
|
|
<description>The PDF/A Identification schema defined in Table 8 uses the namespace URI "http://www.aiim.org/pdfa/ns/id/".
|
|
|
|
|
The required schema namespace prefix is pdfaid. It contains the following fields: pdfaid:part (Open Choice of Integer),
|
|
|
|
|
pdfaid:amd (Open Choice of Text), pdfaid:corr (Open Choice of Text), pdfaid:conformance (Open Choice of Text)</description>
|
|
|
|
|
<test>partPrefix == "pdfaid" && conformancePrefix == "pdfaid" &&
|
|
|
|
|
(amdPrefix == null || amdPrefix == "pdfaid") &&
|
|
|
|
|
(corrPrefix == null || corrPrefix == "pdfaid")</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A property of the PDF/A Identification Schema has an invalid namespace prefix</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="EmbeddedFile">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.8" testNumber="1"/>
|
|
|
|
|
<description>A file specification dictionary, as defined in ISO 32000-1:2008, 7.11.3, may contain the EF key, provided that the embedded file is
|
|
|
|
|
compliant with either ISO 19005-1 or this part of ISO 19005.</description>
|
|
|
|
|
<test>isValidPDFA12 == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>An embedded file does not comply to either ISO 19005-1 or ISO 19005-2</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosFileSpecification">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.8" testNumber="2"/>
|
|
|
|
|
<description>The file specification dictionary for an embedded file shall contain the F and UF keys</description>
|
|
|
|
|
<test>containsEF == false || (F != null && UF != null)</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The file specification dictionary for an embedded file does not contain either F or EF key</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDOCConfig">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.9" testNumber="1"/>
|
|
|
|
|
<description>Each optional content configuration dictionary that forms the value of the D key, or that is an element in the array that forms the
|
|
|
|
|
value of the Configs key in the OCProperties dictionary, shall contain the Name key.</description>
|
|
|
|
|
<test>Name != null && Name.length() > 0</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Missing or empty Name entry of the optional content configuration dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDOCConfig">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.9" testNumber="2"/>
|
|
|
|
|
<description>Each optional content configuration dictionary shall contain the Name key, whose value shall be unique amongst all optional content configuration
|
|
|
|
|
dictionaries within the PDF/A-2 file.</description>
|
|
|
|
|
<test>hasDuplicateName == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Optional content configuration dictionary has duplicated name</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDOCConfig">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.9" testNumber="3"/>
|
|
|
|
|
<description>If an optional content configuration dictionary contains the Order key, the array which is the value of this Order key shall contain references
|
|
|
|
|
to all OCGs in the conforming file.</description>
|
|
|
|
|
<test>doesOrderContainAllOCGs == true</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>Not all optional content groups are present in the Order entry of the optional content configuration dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDOCConfig">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.9" testNumber="4"/>
|
|
|
|
|
<description>The AS key shall not appear in any optional content configuration dictionary.</description>
|
|
|
|
|
<test>AS == null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>AS key is present in the optional content configuration dictionary</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.10" testNumber="1"/>
|
|
|
|
|
<description>There shall be no AlternatePresentations entry in the document's name dictionary</description>
|
|
|
|
|
<test>containsAlternatePresentations == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document's name dictionary contains the AlternatePresentations entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="PDPage">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.10" testNumber="2"/>
|
|
|
|
|
<description>There shall be no PresSteps entry in any Page dictionary</description>
|
|
|
|
|
<test>containsPresSteps == false</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>A Page dictionary contains the PresSteps entry</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
<rule object="CosDocument">
|
|
|
|
|
<id specification="ISO_19005_2" clause="6.11" testNumber="1"/>
|
|
|
|
|
<description>The document catalog shall not contain the Requirements key</description>
|
|
|
|
|
<test>Requirements == null</test>
|
|
|
|
|
<error>
|
|
|
|
|
<message>The document catalog contains the Requirements key</message>
|
|
|
|
|
<arguments/>
|
|
|
|
|
</error>
|
|
|
|
|
<references/>
|
|
|
|
|
</rule>
|
|
|
|
|
</rules>
|
|
|
|
|
<variables>
|
|
|
|
|
<variable name="gOutputCS" object="ICCOutputProfile">
|
|
|
|
|
<defaultValue>null</defaultValue>
|
|
|
|
|
<value>S == "GTS_PDFA1" ? colorSpace : gOutputCS</value>
|
|
|
|
|
</variable>
|
|
|
|
|
<variable name="gOutputProfileIndirect" object="PDOutputIntent">
|
|
|
|
|
<defaultValue>null</defaultValue>
|
|
|
|
|
<value>gOutputProfileIndirect== null ? destOutputProfileIndirect : gOutputProfileIndirect</value>
|
|
|
|
|
</variable>
|
|
|
|
|
</variables>
|
|
|
|
|
</profile>
|