From f8ae8fb32e7c297df92118296ff6bf0f3eb38b4a Mon Sep 17 00:00:00 2001 From: Git User <> Date: Tue, 23 Jan 2024 09:59:56 +0000 Subject: [PATCH] PDF/UA-2. Add tags --- .../org/verapdf/pdfa/validation/PDFUA-2.xml | 1142 +++++++++++++++++ 1 file changed, 1142 insertions(+) create mode 100644 core/src/main/resources/org/verapdf/pdfa/validation/PDFUA-2.xml diff --git a/core/src/main/resources/org/verapdf/pdfa/validation/PDFUA-2.xml b/core/src/main/resources/org/verapdf/pdfa/validation/PDFUA-2.xml new file mode 100644 index 000000000..e2f976634 --- /dev/null +++ b/core/src/main/resources/org/verapdf/pdfa/validation/PDFUA-2.xml @@ -0,0 +1,1142 @@ + + +
+ PDF/UA-2 validation profile + Validation rules against ISO 14289-2:202x +
+ + + + + The PDF/UA version of a file shall be specified in the value of the Metadata entry in the document catalog using the PDF/UA identification schema + UAIdentification_size == 1 + + The document metadata stream doesn't contains PDF/UA Identification Schema + + + + + + + The value of pdfuaid:part shall be the part number of the International Standard to which the file conforms + part == 2 + + The "part" property of the PDF/UA Identification Schema is %1 instead of 2 for PDF/UA-2 conforming file + + part + + + + + + + Property part of the PDF/UA Identification Schema shall have namespace prefix pdfuaid + partPrefix == null || partPrefix == "pdfuaid" + + Property part of the PDF/UA Identification Schema has invalid namespace prefix %1 + + partPrefix + + + + + + + Property rev of the PDF/UA Identification Schema shall have namespace prefix pdfuaid + revPrefix == null || revPrefix == "pdfuaid" + + Property rev of the PDF/UA Identification Schema has invalid namespace prefix %1 + + revPrefix + + + + + + + The value of pdfuaid:rev shall be the four digit year + /^\d{4}$/.test(rev) + + The value of pdfuaid:rev (%1) not the four digit year + + rev + + + + + + + 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-2:2020, 14.7 + StructTreeRoot_size == 1 + + StructTreeRoot entry is not present in the document catalog + + + + + + + + + Struct element shall contain the P entry according to ISO 32000-2:2020, 14.7.2, Table 323 + containsParent == true + + A struct element does not contain the P entry + + + + + + + + + Content that is not considered real shall be an artifact + isTaggedContent == true || parentsTags.split('&').filter(elem => elem == 'Artifact').length > 0 + + Content is neither marked as Artifact nor tagged as real content + + + + + + + All structure elements shall belong to, or be role mapped to, at least one of the following namespaces specified in ISO 32000-2:2020, 14.8.6: — the PDF 1.7 namespace; — the PDF 2.0 namespace; — the MathML namespace + isNotMappedToStandardType == false + + Non-standard structure type %1 is not mapped to a standard type + + valueS + + + + + + + + + A circular mapping shall not exist + circularMappingExist != true + + A circular mapping exists for %1 structure type + + valueS + + + + + + + Structure types shall not be role mapped to other structure types in the same namespace + roleMapToSameNamespaceTag == null + + Structure type %1 is role mapped to other structure type in the same namespace + + roleMapToSameNamespaceTag + + + + + + + All structure elements shall belong to, or be role mapped to, at least one of the following namespaces specified in ISO 32000-2:2020, 14.8.6: — the PDF 1.7 namespace; — the PDF 2.0 namespace; — the MathML namespace + remappedStandardType == null + + The standard structure type %1 is remapped to a non-standard type + + remappedStandardType + + + + + + + + + The structure tree root shall contain a single Document structure element as its only child, as specified in ISO 32000-2:2020, Annex L and ISO/TS 32005 + kidsStandardTypes == 'Document' + + The structure tree root contains %1 element(s) instead of a single Document structure element + + kidsStandardTypes.replaceAll('&', ',') + + + + + + + + + + + + The structure tree root shall contain a single Document structure element as its only child. The namespace for that element shall be specified as the PDF 2.0 namespace + kidsStandardTypes != 'Document' || firstChildStandardTypeNamespaceURL == 'http://iso.org/pdf2/ssn' + + The structure tree root contains a single Document structure element, but this element is not within the PDF 2.0 namespace (namespace URI = %1) + + firstChildStandardTypeNamespaceURL + + + + + + + + + + + + Each TOCI in the table of contents shall identify the target of the reference using the Ref entry, either directly on the TOCI structure element itself or on a child structure element contained within + containsRef == true + + TOCI in the TOC does not contain the Ref entry, neither directly on the TOCI structure element itself nor on its descendant structure elements + + + + + + + Conforming files shall not use the H structure type + false + + Document uses H structure type + + + + + + + The Note standard structure type shall not be present in conforming documents unless role mapped to a structure element in the PDF 2.0 namespace + false + + Document uses Note structure type + + + + + + + Real content that refers to footnotes or endnotes (real content enclosed in FENote structure elements) shall use the Ref entry as specified in 8.8 on the referring structure element to reference the FENote. The corresponding FENote shall also use the Ref entry to identify all citations that reference it + orphanRefs == null + + Ref entry in the FENote does not reference structure elements with object numbers %1, while these structure elements reference this FENote + + orphanRefs + + + + + + + The value of the NoteType attribute of the FENote structure element shall be Footnote, Endnote or None + NoteType == 'Footnote' || NoteType == 'Endnote' || NoteType == 'None' + + NoteType attribute of the FENote structure element has value %1 instead of Footnote, Endnote or None + + NoteType + + + + + + + A link annotation and its associated content shall be enclosed in either a Link or Reference structure element + structParentStandardType == 'Link' || structParentStandardType == 'Reference' + + A Link annotation is an Artifact or is nested within %1 tag (standard type = %2) instead of Link or Reference + + structParentType + structParentStandardType + + + + + + + Link annotations that target different locations shall be in separate Link or Reference structure elements + differentTargetAnnotObjectKey == null + + Struct element %1 contains Link annotations %1 and %2 that target different locations + + structParentObjectKey + objectKey + differentTargetAnnotObjectKey + + + + + + + Multiple link annotations shall be included in a single Link or Reference structure element if they target the same location and are semantically perceived to be a single link + sameTargetAnnotObjectKey == null + + Annotations %1 and %2 target the same location, but are included into different structure elements + + objectKey + sameTargetAnnotObjectKey + + + + + + + A Ruby structure element shall contain a single RB structure element and a single RT structure element or a Ruby structure element shall consist of a four-element subsequence: RB, RP, RT, RP + kidsStandardTypes == 'RB&RT' || kidsStandardTypes == 'RB&RP&RT&RP' + + The Ruby structure element has invalid sequence of children: %1 + + kidsStandardTypes.split('&').toString() + + + + + + + Content typeset as warichu shall be tagged in a three-element sequence consisting of the structure elements WP, WT and WP, grouped inside a Warichu structure element + kidsStandardTypes == 'WP&WT&WP' + + The Warichu structure element has invalid sequence of children: %1 + + kidsStandardTypes.split('&').toString() + + + + + + + If Lbl structure elements are present, the ListNumbering attribute shall be present on the respective L structure element; in such cases the value None shall not be used + containsLabels == false || ListNumbering != 'None' + + List items contain Lbl structure elements, but the ListNumbering attribute is not present on the respective L structure element or it has value None + + + + + + + + + Any real content within an LI structure element that is not enclosed in an Lbl structure element shall be enclosed in an LBody structure element + hasContentItems == false + + The LI structure element contains real content as its direct child instead of enclosing it into Lbl or LBody structure elements + + + + + + + Tables shall be regular. Table cell shall not have intersection with other cells + hasIntersection != true + + Table cell has intersection with other cells + + + + + + + Tables shall be regular. Row groupings formed by THead, TBody and TFoot structure elements shall be regular. Table columns shall have the same number of rows (taking into account row spans) in table and each row groupings formed by THead, TBody and TFoot structure elements + numberOfColumnWithWrongRowSpan == null + + Columns 1 and %1 span different number of rows in table or one of row groupings formed by THead, TBody and TFoot structure elements + + numberOfColumnWithWrongRowSpan + 1 + + + + + + + Tables shall be regular. Table rows shall have the same number of columns (taking into account column spans) + numberOfRowWithWrongColumnSpan == null || wrongColumnSpan != null + + Table rows 1 and %1 span different number of columns + + numberOfRowWithWrongColumnSpan + 1 + + + + + + + Tables shall be regular. Table rows shall have the same number of columns (taking into account column spans) + numberOfRowWithWrongColumnSpan == null || wrongColumnSpan == null + + Table rows 1 and %1 span different number of columns (%2 and %3 respectively) + + numberOfRowWithWrongColumnSpan + 1 + columnSpan + wrongColumnSpan + + + + + + + When a table contains header cells, that table shall provide sufficient semantic information to allow accurate determination of which of its table header cells (structure element TH) pertain to other cells as specified in ISO 32000-2:2020, 14.8.5.7 + hasConnectedHeader != false || unknownHeaders != '' + + TD does not contain Headers attribute, and Headers for this table cell cannot be determined algorithmically + + + + + + + + + + When a table contains header cells, that table shall provide sufficient semantic information to allow accurate determination of which of its table header cells (structure element TH) pertain to other cells as specified in ISO 32000-2:2020, 14.8.5.7 + hasConnectedHeader != false || unknownHeaders == '' + + TD references undefined Header(s) %1, and Headers for this table cell cannot be determined algorithmically + + unknownHeaders + + + + + + + + + + When present, the Caption element shall be the first or the last child of the structure element + kidsStandardTypes.indexOf('&Caption&') < 0 + + Structure element %1 contains Caption as its %2 child instead of first or last one + + objectKey + kidsStandardTypes.split('&').slice(1).findIndex(elem => elem == 'Caption') + 2 + + + + + + + A Figure structure element shall have at least one of the following properties: a) an alternate description (Alt property), as specified in ISO 32000-2:2020, 14.9.3; b) a replacement text (ActualText property) that represents the content enclosed by the Figure structure element + Alt != null || ActualText != null + + Figure structure element neither has an alternate description nor a replacement text + + + + + + + + + The math structure type shall occur only as a child of a Formula structure element + parentStandardType == 'Formula' || parentStandardType == 'MathML' + + The math structure type is nested within %1 tag instead of Formula + + parentStandardType + + + + + + + In all cases, where real content maps to Unicode PUA values, an ActualText or Alt entry shall be present + unicodePUA == false || actualTextPresent == true || altPresent == true + + Real content maps to Unicode PUA values, but ActualText and Alt entry are not present + + + + + + + The ActualText entry shall not contain any PUA values + containsPUA == false + + The ActualText entry contains a Private Unicode Area value + + + + + + + The Alt entry shall not contain any PUA values + containsPUA == false + + The Alt entry contains a Private Unicode Area value + + + + + + + The default natural language for content and text strings shall be specified using the Lang entry, with a non-empty value, in the catalog dictionary + Lang_size > 0 + + Catalog dictionary does not contain Lang entry + + + + + + + If the Lang entry is present in the document's Catalog dictionary or in a structure element dictionary or property list, its value shall be a language identifier as described in ISO 32000-2:2020, 14.9.2. A language identifier shall be a Language-Tag as defined in RFC 3066, Tags for the Identification of Languages + /^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/.test(unicodeValue) + + Value %1 of the Lang entry is not a Language-Tag + + unicodeValue + + + + + + + + + + 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 has a value of Identity-H or Identity-V, then any values for the Registry, Ordering, and Supplement keys may be used in the CIDSystemInfo dictionary of the CIDFont. - Otherwise the corresponding values of the Registry and Ordering keys in both CIDSystemInfo dictionaries shall be identical, and the value of the Supplement key in the CIDSystemInfo dictionary of the CIDFont shall be less than or equal to the value of the Supplement key in the CIDSystemInfo dictionary of the CMap + cmapName == "Identity-H" || cmapName == "Identity-V" || (CIDFontOrdering != null && CIDFontOrdering == CMapOrdering && CIDFontRegistry != null && CIDFontRegistry == CMapRegistry && CIDFontSupplement != null && CMapSupplement != null && CIDFontSupplement <= CMapSupplement) + + CIDSystemInfo entries the CIDFont and CMap dictionaries of a Type 0 font are not compatible (CIDSystemInfo Ordering = %1, CMap Ordering = %2, CIDSystemInfo Registry = %3, CMap Registry = %4, CIDSystemInfo Supplement = %5, CMap Supplement = %6) + + CIDFontOrdering + CMapOrdering + CIDFontRegistry + CMapRegistry + CIDFontSupplement + CMapSupplement + + + + + + + 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-2:2020, Table 115 + Subtype != "CIDFontType2" || CIDToGIDMap != null || fontFile_size == 0 + + A Type 2 CIDFont dictionary has missing or invalid CIDToGIDMap entry + + + + + + + + + All CMaps used within a file that conforms to PDF/UA-2, except those listed in ISO 32000-2:2020, Table 116, shall be embedded in that file, as described in ISO 32000-2:2020, 9.7.5 + 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 + + A non-standard CMap %1 is not embedded + + CMapName + + + + + + + + + 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 + WMode == dictWMode + + WMode entry (value %1) in the embedded CMap and in the CMap dictionary (value %2) are not identical + + WMode + dictWMode + + + + + + + A CMap shall not reference any other CMap except those listed in ISO 32000-2:2020, 9.7.5.2 Table 116 + 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" + + A CMap references another non-standard CMap %1 + + CMapName + + + + + + + + + The font programs for all fonts used for rendering within a conforming file shall be embedded within that file, as defined in ISO 32000-2:2020, 9.9 + Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1 + + The font program is not embedded + + + + + + + + + Embedded fonts shall define all glyphs referenced for rendering within the conforming file. A font referenced solely in text rendering mode 3 is not rendered and is thus exempt from the requirements that impact the visual representation of the glyphs of a font. In all cases for TrueType fonts that are to be rendered, character codes shall be able to be mapped to glyphs in accordance with ISO 32000-2:2020, 9.6.5, without the use of a non-standard mapping chosen by the conforming processor + renderingMode == 3 || isGlyphPresent == null || isGlyphPresent == true + + Not all glyphs referenced for rendering are present in the embedded font program + + + + + + + + + + For every font embedded in a conforming file and referenced for rendering, the glyph width information in the font dictionary and in the embedded font program shall be consistent for every glyph + renderingMode == 3 || widthFromFontProgram == null || widthFromDictionary == null || Math.abs(widthFromFontProgram - widthFromDictionary) <= 1 + + Glyph width %1 in the embedded font program is not consistent with the Widths entry of the font dictionary (value %2) + + widthFromFontProgram + widthFromDictionary + + + + + + + For all non-symbolic TrueType fonts used for rendering, the embedded TrueType font program shall contain at least Microsoft Unicode (3,1 – Platform ID=3, Encoding ID=1), or Macintosh Roman (1,0 – Platform ID=1, Encoding ID=0) 'cmap' subtable + isSymbolic == true || cmap31Present == true || cmap10Present == true + + The embedded font program for a non-symbolic TrueType font does not contain Microsoft Symbol (3,0 – Platform ID=3, Encoding ID=0) or the Mac Roman (1,0 – Platform ID=1, Encoding ID=0) encoding + + + + + + + All non-symbolic TrueType fonts shall have either MacRomanEncoding or WinAnsiEncoding as the value for the Encoding key in the Font dictionary or as the value for the BaseEncoding key in the dictionary which is the value of the Encoding key in the Font dictionary. In addition, 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 + isSymbolic == true || ((Encoding == "MacRomanEncoding" || Encoding == "WinAnsiEncoding") && (containsDifferences == false || differencesAreUnicodeCompliant == true)) + + A non-symbolic TrueType font encoding does not define a correct mapping to the Adobe Glyph List (Encoding = %1, Encoding entry contains a Differences = %2, Differences are Unicode compliant = %3) + + Encoding + containsDifferences + differencesAreUnicodeCompliant + + + + + + + Symbolic TrueType fonts shall not contain an Encoding entry in the font dictionary + isSymbolic == false || Encoding == null + + A symbolic TrueType font specifies an Encoding entry in its dictionary + + + + + + + The 'cmap' subtable in the embedded font program shall either contain the Microsoft Symbol (3,0 – Platform ID=3, Encoding ID=0) or the Mac Roman (1,0 – Platform ID=1, Encoding ID=1) encoding + isSymbolic == false || cmap30Present == true || cmap10Present == true + + The embedded font program for a symbolic TrueType font does not contain Microsoft Symbol (3,0 – Platform ID=3, Encoding ID=0) or the Mac Roman (1,0 – Platform ID=1, Encoding ID=0) encoding + + + + + + + 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 14289-2, 8.4.5.8 + toUnicode != null + + The glyph can not be mapped to Unicode + + + + + + + + + + If a ToUnicode CMap is present, the Unicode values it specifies shall all be greater than zero (0), but not equal to either U+FEFF or U+FFFE + toUnicode == null || (toUnicode.indexOf("\u0000") == -1 && toUnicode.indexOf("\uFFFE") == -1 && toUnicode.indexOf("\uFEFF") == -1) + + The glyph has an invalid Unicode value, which is either 0, or is equal to U+FEFF or U+FFFE + + + + + + + A file in conformance with PDF/UA-2 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 + name != ".notdef" + + The document contains a reference to the .notdef glyph + + + + + + + + + Real content that does not possess the semantics of text objects and does not have an alternate textual representation shall be enclosed within Figure or Formula structure elements as appropriate + itemType == 'text' || isTaggedContent == false || ActualText != null || isArtifact == true || isFigure == true || isFormula == true + + Real content that does not possess the semantics of text objects and does not have an alternate textual representation is not enclosed within Figure or Formula structure elements + + + + + + + + + + Text strings intended to be human readable shall not use the Unicode PUA + containsPUA == false + + Text string intended to be human readable uses Unicode PUA + + + + + + + + + All optional content configuration dictionaries in the document, including the default optional content configuration dictionary, shall contain a Name entry (see ISO 32000-2:2020, Table 96) whose value is a non-empty text string when: a) a document contains a Configs entry in the OCProperties entry of the catalog dictionary (see ISO 32000-2:2020, Table 29), and b) the Configs entry contains at least one optional content configuration dictionary + gContainsConfigs == false || (Name != null && Name.length() > 0) + + Missing or empty Name entry of the optional content configuration dictionary + + + + + + + + + + The AS key shall not appear in any optional content configuration dictionary + AS == null + + AS key is present in the optional content configuration dictionary + + + + + + + All destinations whose target lies within the current document shall be structure destinations + isStructDestination == true + + Destination in Outline item or Link annotation is not a structure destination + + + + + + + + + + All destinations whose target lies within the current document shall be structure destinations + containsStructDestination == true + + Destination in GoTo action is not a structure destination + + + + + + + + + + Annotations shall be included in the structure tree unless explicitly excluded by the following subclauses + (structParentType != null && isArtifact == false) || (Subtype == "Popup") || (Subtype == "PrinterMark") || (Subtype == "Widget" && width == 0 && height == 0) || ((F & 1) == 1) || ((F & 32) == 1 && (F & 256) == 0) + + Annotation is not included in the structure tree + + + + + + + + + + + + + Annotations shall be artifacts, if the Invisible flag is set in accordance with ISO 32000-2:2020, Table 167 + structParentType == null || isArtifact == true || (F & 1) == 0 + + An invisible annotation is included in logical structure with tag %1 (standard type = %2, Invisible = %3) + + structParentType + structParentStandardType + F != null ? (F & 1) : null + + + + + + + + + Annotations shall be artifacts if the NoView flag is set and the ToggleNoView flag is not set in accordance with ISO 32000-2:2020, Table 167 + structParentType == null || isArtifact == true || ((F & 32) == 0 || (F & 256) == 1) + + An invisible annotation is included in logical structure with tag %1 (standard type = %2, NoView = %3, ToggleNoView = %4) + + structParentType + structParentStandardType + F != null ? (F & 32) >> 5 : null + F != null ? (F & 256) >> 8 : null + + + + + + + + + Markup annotations shall be enclosed within Annot structure elements + structParentStandardType == 'Annot' + + A Markup annotation is an Artifact or is nested within %1 tag (standard type = %2) instead of Annot + + structParentType + structParentStandardType + + + + + + + When both RC and Contents entries are present for markup annotation, they shall be textually equivalent + containsRC == false || Contents == null || RC == Contents + + A Markup annotation contains Contents and RC entries with non-equivalent textual values (RC = %1, Contents = %2) + + RC + Contents + + + + + + + If the Name entry is insufficient to describe the intent of the stamp annotation, a Contents entry describing the author’s intent shall be provided + Name != null || Contents != null + + Rubber stamp annotation contains neither Name nor Contents entry + + + + + + + + + A Contents entry describing the author’s intent shall be provided for Ink annotation + Contents != null + + Ink annotation does not contain Contents entry + + + + + + + Popup annotations shall not be present in the structure tree + structParentType == null || isArtifact == true + + A Popup annotation is included in logical structure with tag %1 (standard type = %2) + + structParentType + structParentStandardType + + + + + + + + + When a file attachment annotation references a file specification dictionary, the file specification dictionary shall include an AFRelationship entry + containsFS == false || AFRelationship != null + + The file specification dictionary referenced by a file attachment annotation does not include AFRelationship entry + + + + + + + + + + Sound annotation cannot be used when conforming to PDF/UA-2 + false + + An annotation of subtype Sound exists + + + + + + + Movie annotation cannot be used when conforming to PDF/UA-2 + false + + An annotation of subtype Movie exists + + + + + + + Screen annotations shall include a Contents entry + Contents != null + + Screen annotation does not contain Contents entry + + + + + + + A widget annotation of zero height and width shall be an artifact + width != 0 || height != 0 || structParentType == null || isArtifact == true + + A Widget annotation of zero height and width is not marked as an Artifact (structure tag = %1, standard type = %2) + + structParentType + structParentStandardType + + + + + + + + + A printer's mark annotation shall be an artifact + structParentType == null || isArtifact == true + + A PrinterMark annotation is included in logical structure with tag %1 (standard type = %2) + + structParentType + structParentStandardType + + + + + + + + + Trap network annotations shall not be used in files conforming to PDF/UA-2 + false + + An annotation of subtype TrapNet exists + + + + + + + When used as real content, Watermark annotations shall be enclosed within Annot structure elements + structParentType == null || isArtifact == true || structParentStandardType == 'Annot' + + A Watermark annotation is nested within %1 tag (standard type = %2) instead of Annot + + structParentType + structParentStandardType + + + + + + + 3D annotation shall include alternate description in respective Contents entry + Contents != null + + 3D annotation does not contain Contents entry + + + + + + + + + RichMedia annotation shall include alternate description in respective Contents entry + Contents != null + + RichMedia annotation does not contain Contents entry + + + + + + + + + Every page that includes an annotation shall contain a Tabs entry in its page dictionary in accordance with ISO 32000-2:2020, Table 31, and its value shall be A, W or S + annots_size == 0 || Tabs == 'A' || Tabs == 'W' || Tabs == 'S' + + A page with annotation(s) contains Tabs key with value %1 instead of A, W or S + + Tabs + + + + + + + Where an annotation has a Contents entry and the directly enclosing structure element has an Alt entry, the values of Alt and Contents shall be identical + Contents == null || Alt == null || Contents == Alt + + Both Contents and Alt entries are present for the annotation, but they are not identical (Contents = %1, Alt = %2) + + Contents + Alt + + + + + + + Each widget annotation shall be enclosed by a Form structure element unless the widget annotation is an artifact + structParentType == null || structParentStandardType == 'Form' || isArtifact == true + + A Widget annotation is nested within %1 tag (standard type = %2) instead of Form or Artifact + + structParentType + structParentStandardType + + + + + + + A Form structure element shall contain at most one widget annotation + widgetAnnotsCount <= 1 + + A Form structure element contains %1 widget annotations + + widgetAnnotsCount + + + + + + + XFA forms shall not be present + containsXFA == false + + XFA form is present + + + + + + + + + If a label for a widget annotation is not present, a Contents entry shall be provided to supply description and context for the widget + containsLbl == true || Contents != null + + Widget annotation contains neither label nor Contents entry + + + + + + + If an additional action (AA) entry is present in a widget annotation dictionary, the respective widget's Contents entry shall be present + containsAA == false || Contents != null + + Widget annotation dictionary contains an AA entry, but not contains the Contents entry + + + + + + + + + For text fields, when an RV entry is present a V entry shall also be present, and they shall be textually equivalent + containsRV == false || (V != null && RV == V) + + Text field contains RV entry, but no V entry or they are not textually equivalent (RV = %1, V = %2) + + RV + V + + + + + + + + + + If a portion of the appearance of a signature is represented by a graphic, alternative text shall be provided for that graphic + isSignature == false || Alt != null + + A portion of the appearance of a signature is represented by a graphic, but alternative text is not provided for that graphic + + + + + + + The Metadata stream as specified in ISO 32000-2:2020, 14.3 in the document catalog dictionary shall contain a dc:title entry + dc_title != null + + Metadata stream does not contain dc:title + + + + + + + + + The ViewerPreferences dictionary of the document catalog dictionary shall be present and shall contain at least the DisplayDocTitle key with a value of true, as described in ISO 32000-2:2020, Table 147 + DisplayDocTitle == true + + ViewerPreferences dictionary is not present in the document Catalog, or DisplayDocTitle key is set to false or is not present in the ViewerPreferences dictionary (ViewerPreferences = %1, DisplayDocTitle = %2) + + ViewerPreferences + DisplayDocTitle + + + + + + + + + The Desc entry shall be present on all file specification dictionaries present in the EmbeddedFiles name tree of a conforming document + containsDesc == true || presentInEmbeddedFiles == false + + The file specification dictionary for an embedded file does not contain Desc key + + + + + + + + false + containsConfigs + + +