function ValidatePdfA: TPdfAValidationResult;
ValidatePdfA walks the open document looking for every PDF/A conformance marker defined by ISO 19005-1 (with Cor.1:2007):
pdfaid:part and pdfaid:conformance entries, which tells the validator what PDF/A level the document was authored against (1a, 1b, 2b, 3b, ...)/ID array (mandatory per ISO 19005-1 6.1.3)xmp:CreateDate and xmp:ModifyDate in the XMP packet (required when the Info dictionary holds CreationDate / ModDate values per 6.7.3 Example 2)pdfaExtension:schemas container describing the pdfaid extension schema (required by 6.7.8 / Cor.1)The result is a TPdfAValidationResult record:
pac1a, pac1b, pac2a, pac2b, pac2u, pac3a, pac3b, pac3u, pac4base, pac4f, pac4e, pacNone, or pacUnknown for a PDF/A marker without a recognized level)TPdfAValidationIssues set of TPdfAValidationIssue values describing each problem found. The structural markers are pvaiMissingXmpMetadata, pvaiMissingPdfAIdentifier, pvaiMissingOutputIntent, pvaiMissingIccProfile, pvaiEncryptionPresent, pvaiMissingTrailerId, pvaiMissingXmpDates, pvaiMissingExtensionSchema, and pvaiExtensionSchemaPrefix (an extension schema description that binds one of the four description namespaces of 6.7.8 to a prefix other than pdfaSchema, pdfaProperty, pdfaType or pdfaField). It also reports content-level violations that marker injection cannot fix: pvaiLevelAStructureMissing (a Level A claim with no tagged structure), pvaiJavaScriptPresent, pvaiForbiddenAction, pvaiAdditionalActions, pvaiEmbeddedFilesNonConforming, pvaiLzwUsed, pvaiTransparencyForbidden, pvaiOptionalContentForbidden, pvaiForbiddenAnnotation, pvaiNeedAppearancesTrue (the active AcroForm resolves /NeedAppearances to true; unreadable active revisions use the legacy byte scan), pvaiXfaPresent (the active AcroForm contains /XFA), pvaiFontNotEmbedded, and pvaiUnicodeMappingMissing (a PDF/A-2u / PDF/A-3u claim whose fonts lack /ToUnicode). Stricter ISO 19005 checks add pvaiForbiddenActionSubtype, pvaiTransparentColorSpace, pvaiAnnotationDictViolation, pvaiUnembeddedFont, pvaiMixedDeviceColorSpaces, pvaiUndefinedContentOperator, pvaiForbiddenRenderingIntent, pvaiExtGStateTransferFunction, pvaiImageDictionaryViolation, pvaiFormXObjectViolation, pvaiPostScriptOrRefXObject, pvaiAnnotationFlagsViolation, pvaiDeprecatedAction, pvaiMetadataFilterForbidden, pvaiStructElemTypeMissing, and pvaiRoleMapMissing; pvaiTrappedTrue keeps its ordinal but is no longer reported, because PDF/A sets no rule for the Info /Trapped entry (the XMP pdf:Trapped property is reported by pvaiXmpForbiddenProperty). Round 4 adds pvaiHeaderBinaryMarkerMissing and pvaiHeaderVersionInvalid (6.1.2), pvaiExternalStreamRef (6.1.7), pvaiOutputIntentScheme (6.2.2), pvaiInfoXmpDateMismatch (6.7.3), pvaiMarkInfoMissing (6.8.2.2 Level A), pvaiAnnotationApDictViolation (6.5.3), pvaiEmbeddedFileMissingAFRelationship (PDF/A-3 Annex E.2), and pvaiJpeg2000Violation (PDF/A-2 6.2.8.3). Round 5 adds pvaiCidFontMissingCidToGidMap (6.3.3.2), pvaiSubsetMissingCharSet (6.3.5, a Type 1 subset only — the font type comes from the owning font dictionary’s /Subtype, not from the embedding key), pvaiSubsetMissingCidSet (6.3.5, a CIDFont subset only, for the same reason), pvaiWidgetActionForbidden (6.6.1), and pvaiOptionalContentAsKey (PDF/A-2 6.9). Round 6 adds pvaiNeedsRenderingPresent (the active catalog contains /NeedsRendering, regardless of its value; PDF/A-2, PDF/A-3, and PDF/A-4 §6.4.2), pvaiDestOutputProfileRef (PDF/A-3 6.2.3), pvaiEmbeddedFileMissingUF (PDF/A-3 6.8), pvaiXmpPacketBytesAttr (6.7.5), and pvaiAnnotationToggleNoView (PDF/A-2 6.3.2). Round 7 (v1.73.0) adds the Pdfium object-model layer: pvaiPdfiumFontNotEmbedded (6.3.4, per-font FPDFFont_GetIsEmbedded) and pvaiPdfiumUnicodeMapError (6.3.8, per-character FPDFText_HasUnicodeMapError); these are set by TPdf.ValidatePdfA, not the standalone byte-level ValidatePdfACompliance. Round 8 (v1.74.0) adds pvaiPermissionsViolation (6.1.12), pvaiTransActionForbidden (PDF/A-2 6.5.1), and pvaiPdfiumObjectTransparency (PDF/A-1 6.4 via FPDFPageObj_HasTransparency). Round 9 (v1.75.0) adds pvaiIntegerImplementationLimit (PDF/A-2 6.1.13), pvaiBlendModeNotWhitelisted (PDF/A-2 6.2.10), and pvaiHexStringOddDigits (6.1.6). Round 10 (v1.76.0) adds pvaiNameNotValidUtf8 (PDF/A-2 6.1.8), pvaiInlineImageLzwForbidden (PDF/A-2 6.1.10), and pvaiTrueTypeDifferencesForbidden (6.3.7). Round 11 (v1.77.0) adds pvaiPdfiumNotDefGlyph (PDF/A-2 6.2.11.8, Pdfium object-model), pvaiWordBreakMissing (Level A 6.8.3.2), and pvaiLinkActionMissingTarget (6.6.3). Later rounds add the Level A RoleMap resolution and ParentTree / ClassMap integrity checks pvaiRoleMapUnresolved (6.8.3.4, a used non-standard /S name without a RoleMap entry or whose chain does not end at a standard type), pvaiParentTreeMissing (a StructTreeRoot without /ParentTree), pvaiPageStructParentsMissing (a tagged page whose marked content has no /StructParents anchor), and pvaiClassMapUnresolved (6.8.3, a structure element /C name without a matching ClassMap entry), the ISO 19005-1 Annex C container implementation limits pvaiNameOverLimit (a name token longer than 127 bytes), pvaiArrayOverLimit (an array with more than 8191 elements), pvaiDictOverLimit (a dictionary with more than 4095 entries), and pvaiNestingOverLimit (containers nested deeper than 28 levels) — these three container limits come from the PDF Reference 1.4 table that PDF/A-1 defers to and are checked for PDF/A-1 only, since the ISO 19005-2 table used from part 2 on has no container entries —, and the ISO 19005-1 6.3.7 symbolic TrueType check pvaiSymbolicTrueTypeEncoding (a symbolic TrueType font carrying /Encoding), and the ISO 19005-1 6.7.2 predefined-XMP-property checks pvaiXmpPropertyTypeViolation (a predefined property carried in a container form or value type its schema does not declare — dc:contributor as a string instead of a bag, tiff:ImageWidth of “256 mm”, a Date that is not ISO 8601, a Lang Alt item without xml:lang; applied from an explicit PDF/A claim in parts 1 to 3, where the table of TN0008 governs part 1 and the definitions of ISO 16684-1 govern the later parts, with a declaration the two specifications state differently following the part the packet claims — photoshop:SupplementalCategories is Text in 2004 and Bag Text from 2005 on — while part 4 restates the metadata requirements as 6.7.2.1 without that sentence) and pvaiXmpForbiddenProperty (a predefined-schema property PDF/A-1 does not allow, such as xmp:Author, pdf:Title or photoshop:Copyright), and the CMap rules of ISO 19005-1 6.3.3.3 and ISO 19005-2 6.2.11.3.3 add pvaiCmapNotEmbedded, pvaiCmapWModeMismatch and pvaiCmapUseCmapNotPredefined, and the Unicode-value rule of ISO 19005-2 6.2.11.7.2 adds pvaiToUnicodeForbiddenValue, and the four tables of the 6.6.2.3.3 extension schema container add pvaiExtensionSchemaEntryMissing, and the Colorants rule of ISO 19005-2 6.2.4.4 adds pvaiSpotColorantUndefined and pvaiSeparationArrayDiffers, the catalog version of ISO 19005-4 6.1.12 adds pvaiCatalogVersionInvalid, and the TrueType encoding rule of ISO 19005-1 6.3.7, ISO 19005-2 6.2.11.6 and ISO 19005-4 6.2.10.6 adds pvaiTrueTypeEncodingNotStandard, and the three sentences ISO 19005-1 6.1.7 and ISO 19005-2 6.1.7.1 state about the shape of a stream object add pvaiStreamKeywordSeparator, pvaiStreamLengthMismatch and pvaiEndstreamMarkerMissing, and the trailing-data rule of ISO 19005-1 6.1.3 and ISO 19005-4 6.1.3 adds pvaiTrailingDataAfterEof, and the three keys ISO 19005-2 6.10 and 6.11 (6.11 and 6.12 in PDF/A-4) prohibit add pvaiAlternatePresentationsPresent, pvaiPagePresStepsPresent and pvaiCatalogRequirementsPresent, and the PDF 2.0 extended-graphics-state key of ISO 19005-4 6.2.5 adds pvaiExtGStateHtoPresent, and the trailer-identifier rule of ISO 19005-2 6.1.3 and the permissions-key rule of 6.1.12 add pvaiTrailerIdNotFileIdentifiers and pvaiPermissionsKeyNotAllowed, and the inline-image filter list of ISO 19005-2 6.1.10 and the annotation types of 6.3.1 add pvaiInlineImageFilterNotListed and pvaiAnnotationTypeNotPermitted, and the trigger-key list ISO 19005-4 6.6.3 puts on an additional-actions dictionary adds pvaiAdditionalActionKeyNotPermitted, and the second sentence of ISO 19005-4 6.2.10.8 and the five header conditions of ISO 19005-2 6.2.8.3 add pvaiActualTextPrivateUse and pvaiJpxHeaderInvalid, and the ban on the .notdef glyph in ISO 19005-2 6.2.11.8 adds pvaiNotdefGlyphShown, and the overprint and profile-identity sentences of ISO 19005-4 6.2.4.2 add pvaiIccOverprintModeOne and pvaiIccProfileNotDistinct, and the width comparison of ISO 19005-1 6.3.6 and ISO 19005-2 6.2.11.5 adds pvaiFontWidthInconsistent, and the glyph-presence sentence of ISO 19005-2 6.2.11.4.1 (6.2.10.4.1 in PDF/A-4) adds pvaiGlyphMissingFromProgrampvaiOptionalContentNameMissing (an OCCD that forms the /D value or an element of /Configs lacks /Name), pvaiOptionalContentNameDuplicate (two OCCDs carry the same /Name value), and pvaiOptionalContentOrderIncomplete (an OCCD carries /Order but the array does not reference every OCG of the file; nested arrays are flattened and an OCCD reached through both /D and /Configs is counted once)pvaiStringOverLimit (a string past the part length limit — 65535 bytes in PDF/A-1, 32767 from PDF/A-2 on — in an object or a page content stream), pvaiDeviceNOverLimit (a DeviceN colour space that declares more colourants than the part allows — 8 in PDF/A-1, 32 from PDF/A-2 on, with a /None entry counting as an absent component rather than a colourant), pvaiPageBoxSizeInvalid (a page boundary smaller than 3 or larger than 14400 units in either direction, judged per page on the effective inherited value so a page value overrides the page-tree root), and pvaiEmbeddedFileSubtypeInvalid (a missing or invalid MIME Subtype name on a PDF/A-3 embedded file stream. The check follows active EF references and resolves indirect names using their object generation. Name escapes are decoded before the type/subtype check. PDF/A-4 uses its separate present-name check), and pvaiEmbeddedFileUnassociated (an embedded file specification with no verified PDF/A-3 dictionary or marked-content association. Balanced BDC/EMC scopes bind their named Properties arrays in the current resources. An unresolved property candidate reports pvaiEmbeddedPdfAUnchecked, and a verified association used by DP reports pvaiEmbeddedFileGraphInvalid); pvaiNameOverLimit measures a name after #xx expansion and pvaiIntegerImplementationLimit also covers content-stream operands, pvaiHexStringOddDigits and pvaiHexStringInvalidChar inspect hex strings in objects and content streams, and pvaiNameNotValidUtf8 decodes #xx escapes in Separation and DeviceN colourant names; pvaiAnnotationFlagsViolation also reports an annotation dictionary without F (Popup excepted), and pvaiAnnotationApDictViolation reports a button widget whose /AP /N is a plain appearance stream instead of an appearance-state subdictionarypvaiCidOverLimit reports an encoding CMap whose cidchar target, cidrange start, or last CID a range maps onto (the start plus the code interval's extent) exceeds that limit. The CMap is reached through a composite font's /Encoding reference and through every stream typed /CMap, so a CMap without /Type and a font kept inside an object stream are both covered. ToUnicode CMaps carry bfchar / bfrange mappings whose targets are Unicode values, not CIDs, and are never scanned; ISO 19005-1 carries no CID limit, so PDF/A-1 stays silentpvaiExtGStateHtpPresent (an ExtGState carries the forbidden HTP halftone phase), pvaiHalftoneTypeInvalid (a halftone type other than 1 or 5), pvaiHalftoneNamePresent (a halftone with HalftoneName), and pvaiImageBitsPerComponentInvalid (an image sample depth outside 1, 2, 4, 8 and, from PDF/A-2 on, 16, or an image mask that declares a depth other than 1), and pvaiExtGStateRenderingIntentInvalid (an ExtGState RI naming an intent outside the four standard values, which part 1 states through 6.2.8 and 6.2.9 and is therefore reported in every part)pvaiOutputIntentProfileMismatch (two OutputIntents entries reference different DestOutputProfile objects), and extend pvaiMissingIccProfile to an invalid ICC signature, version, device class or colour space; pvaiForbiddenRenderingIntent also covers an inline-image Intent, the Intent key of an image XObject, and the ri operator of a page or Form content stream, which are the places ISO 19005-2 6.2.6 lets a rendering intent be written. The intent name is taken from the operand that precedes the ri operator, so a permitted intent followed by another resource name is not reported; pvaiMissingOutputIntent and pvaiMissingIccProfile are raised only where ISO 19005-1 6.2.2 and 6.2.3.3 make a PDF/A OutputIntent and its ICC profile mandatory, namely when the reachable content paints in an uncalibrated device colour space that no DefaultRGB, DefaultCMYK or DefaultGray mapping calibrates, while an OutputIntents entry that lacks DestOutputProfile is always reported because 6.2.2 makes the profile part of the intent; a PDF/A-4 file may place OutputIntents on a page dictionary, where ISO 32000-2 Table 30 added the key, and such an intent counts for that page, while parts 1 to 3 only accept the catalog entry that PDF 1.4 to 1.7 defineDo invocations into Form XObjects, including nested forms and resources inherited from the page tree, and reports an undefined operator inside an invoked form as pvaiUndefinedContentOperator; a form that is declared but never invoked stays exempt, and pvaiHalftoneTransferFunctionMissing reports a type 5 halftone whose non-process colorant components (or whose Default entry when non-process colorants exist) lack TransferFunctionCharProcs that paints it neither maps the space through DefaultRGB / DefaultCMYK nor is covered by an OutputIntent profile of that component count, PDF/A-1 additionally forbids painting in both spaces, and a fill or stroke made before any colour space is selected counts as the initial DeviceGray. Reading a content stream to that end now also stops treating the samples between ID and EI as operators and accepts g and G as defined operatorspvaiBlendSpaceUndefined reports a page that contains transparency while the file declares no PDF/A OutputIntent and the page carries no Group attribute dictionary with a CS entry, and reports a group CS that names DeviceRGB or DeviceCMYK while the declared intent has a profile of a different component count. Containment follows the normative Annex A of ISO 19005-2 instead of counting transparency-bearing objects: a selected ExtGState with a soft mask, ca or CA below 1 or a blend mode other than Normal, an invoked Image XObject with an SMask stream or SMaskInData, an invoked Form XObject or tiling pattern whose Group names /S /Transparency, a glyph description of an invoked Type 3 font, and an annotation’s normal appearance stream, because that stream is painted on top of the page. A widget may keep one appearance stream per state under /AP /N, and every state is judged because any of them can be painted once the reader flips /AS; a blend mode the annotation names itself in /BM counts toopvaiTransActionForbidden and pvaiForbiddenAnnotation are now decided from structure rather than from raw bytes: /S /Transparency is the subtype of a transparency group and is no longer reported as the forbidden Trans transition action, and /BM /Screen is a standard blend mode and is no longer reported as a Screen annotation, whose name is matched through a /Subtype entrypvaiFontNotEmbedded follows the Tf selection to the show operator that draws with it, so a font that is only declared - the /DR /Font entries an AcroForm keeps ready, a resource no page selects - is not reported. Type 3 fonts stay exempt, and a composite font is satisfied by a program on its descendant CIDFontDefaultRGB / DefaultCMYK mapping, per ISO 19005-2 6.2.4.3: what a page paints counts as calibrated by the page group’s CS whether that group is isolated or not, because the page group is the space the content starts in; a Form XObject or an annotation appearance stream is the other way round, and only an isolated group there calibrates, because a non-isolated one composites into the backdrop. DeviceGray is never calibrated by a group space, since the third paragraph of the clause asks for a DefaultGray mapping or a PDF/A OutputIntent, and the space a group itself names is still reported when it is a device space, because the group does not calibrate itselfpdfaExtension:schemas is needed is part dependent, because the two parts point at different specifications: ISO 19005-1 6.7.2 defers to XMP Specification 4, dated January 2004, and ISO 19005-2 6.6.2.3.1 to ISO 16684-1. The later table adds XMP dynamic media, camera raw settings, the two graphics structure schemas, Exif auxiliary, JPEG, SWF, PLUS and PDF/X, so a property drawn from one of those needs no declaration from part 2 on — that is what keeps the 102 PDF/A-2b fixtures which carry a camera-raw or dynamic-media hint unreported — while in PDF/A-1 the three namespaces TN0008 footnotes as introduced by the 2005 revision, crs, aux and xmpDM, are extension schemas whose properties have to be described. Only a namespace outside both lists, and outside the PDF/A identification schemes, raises pvaiMissingExtensionSchema. ISO 19005-4 6.7.2.1 does not carry that requirement: its five XMP rules govern the packet itself, so a part 4 packet raises this finding for no namespace at allpvaiExtensionSchemaPrefix reports an extension schema description that binds one of the four description namespaces to a prefix other than the one its table requires. 6.7.8 spells this out once per structure — “The field namespace URI is <http://www.aiim.org/pdfa/ns/property>. The required field namespace prefix is pdfaProperty.” — and ISO 19005-2 6.6.2.3.2 repeats all four, so the prefix is normative in the same way the URI is: a reader following the table finds no description for a schema the file does use. The comparison ignores the trailing #, which the prose of 6.7.8 omits and its own tables carrypvaiExtensionSchemaEntryMissing reads the descriptions themselves. ISO 19005-2 6.6.2.3.2 closes with the sentence that makes the tables binding — “All fields described in each of the tables in 6.6.2.3.3 shall be present in any extension schema container schema” — and sixteen fields over four tables follow: a Schema states pdfaSchema:schema, namespaceURI and prefix; a Property pdfaProperty:name, valueType, category and description; a ValueType pdfaType:type, namespaceURI, prefix, description and field; and a Field pdfaField:name, valueType and description. The bag of properties and the bag of value types are optional, and the corpus passes a schema that declares neither a property nor a value type, so an empty bag is not reported; a value type that is described at all describes a structured type, so its field list is. Each description is walked as a nested rdf:li resource, taking the matching close of every item so an entry inside a rdf:Seq is never read as a sibling description, and both spellings RDF allows are accepted: an element and an attribute on the resource, pdfaSchema:prefix="fs" counting the same as <pdfaSchema:prefix>fs</pdfaSchema:prefix>. Both this finding and pvaiExtensionSchemaPrefix above are limited to parts 1 to 3: ISO 19005-4 6.7.2.1 judges only the XMP packet, so a part 4 file whose extension schema description is malformed stays compliant under the full PDF/A-4 profilepvaiSpotColorantUndefined reads the Colorants dictionary of a DeviceN or NChannel colour space. ISO 19005-2 6.2.4.4 says that for any spot colour used in such a space “an entry in the Colorants dictionary shall be present”, and its note records what that changes: ISO 32000-1 makes the Colorant key optional, so the sentence is what makes it mandatory here. The components a device space already names — Cyan, Magenta, Yellow and Black — are not spot colours and need no entry; any other name the array lists does. The check reads the fifth element of the array, follows it through an indirect reference, and reports both a colourant the dictionary omits and an array that stops after the tintTransform, which leaves no dictionary to hold the entry at all. An attributes dictionary the file damages beyond resolution is left alone, since an unreadable dictionary is not evidence that the entry is absent. NChannel is a subtype of the same array, so one walk covers both families. ISO 19005-1 never mentions a Colorants dictionary, so the rule holds from part 2 onpvaiSeparationArrayDiffers compares the Separation arrays that share a name. The same clause requires that “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”, and it says how to compare them: “the PDF objects shall be compared, rather than the computational result of the use of those PDF objects”, with compression and indirectness ignored. So a value is first reduced to text two spellings of one object agree on — references resolved, dictionary entries sorted by key, numbers reduced to their value, a stream replaced by the bytes it decodes to — and two arrays are reported only when that text differs. Two arrays that hold the same function as two separate objects therefore conform, while one written with a different tintTransform or a different alternateSpace does not. Both the resource form and the one a Colorants dictionary holds count. A comparison that cannot follow a reference the file has damaged is skipped rather than guessed at, and the walk is bounded so a directory that references itself costs nothingpvaiCatalogVersionInvalid reads the Version key of the document catalog in a PDF/A-4 file. That part is PDF 2.0, which names a single version, so a catalog that states one has to state /2.0: three characters, a 2, a full stop and a digit. The value is a name, so the escapes are expanded before it is judged — the corpus passes /#32#2E#30 for the same bytes — and the token is resolved inside the dictionary that owns it, which is the nearest one opening at or before the token and still closing after it. The entry is optional, so a catalog without it conforms. The clause number is part-specific: 6.1.12 of ISO 19005-1, -2 and -3 is the implementation limits, and none of those parts states anything about this key, so the check runs for a part 4 claim alonepvaiTrueTypeEncodingNotStandard judges the encoding of a non-symbolic TrueType font. ISO 19005-1 6.3.7, ISO 19005-2 6.2.11.6 and ISO 19005-4 6.2.10.6 confine such a font to the two encodings every reader carries: it shall name MacRomanEncoding or WinAnsiEncoding, or hold an encoding dictionary whose BaseEncoding names one of the two. The check therefore reports a font that states some other encoding, one that states no Encoding at all, an encoding dictionary without BaseEncoding, and a BaseEncoding that is no name. Symbolic fonts belong to the mirror rule and are not judged here; the descriptor’s Flags bit 3, whose value is 4, is what marks them, and a font whose descriptor is missing or whose reference resolves to no dictionary is left alone, because without that bit the encoding alone decides nothing. Part 1 states the requirement in its name-only shape, but the dictionary shape is accepted in every part — a wider reading that cannot misreport a conforming filepvaiTrueTypeDifferencesForbidden reads the same clause differently in different parts. ISO 19005-1 6.3.7 as replaced by Cor.2 says that an encoding dictionary “shall not contain a Differences entry” and states no exemption, so in part 1 any /Differences on a non-symbolic TrueType font is reported. ISO 19005-2 6.2.11.6, ISO 19005-3 and ISO 19005-4 6.2.10.6 instead say that such a font “shall not define a Differences array unless all of the glyph names in the Differences array are listed in the Adobe Glyph List”; from part 2 on the validator carries the 4,281 names of Adobe Glyph List 2.0 and reports the array only when a name is absent from that closed set. Names are compared framed by spaces, so /grav does not pass as a prefix of /grave. The scan follows an indirect encoding dictionary and the font descriptor’s /Flags: bit 3 marks a symbolic font, which the sentence does not bind, and a font whose descriptor the bytes do not resolve is left alone. The other half of the sentence — the Microsoft Unicode (3,1) cmap the embedded program owes — is not judged here, because no corpus fixture turns on it alone and reading cmap tables to condemn a file the bytes do not clearly condemn would only add false positivespvaiStreamKeywordSeparator, pvaiStreamLengthMismatch and pvaiEndstreamMarkerMissing judge the shape of a stream object by the three sentences ISO 19005-1 6.1.7 and ISO 19005-2 6.1.7.1 state: the keyword is followed by CR LF or a single LF, the closing mark is preceded by an EOL marker, and the Length counts the bytes between the two. A lone CR after the keyword and a space before the LF are findings, because neither is one of the two shapes named. The Length is followed to its object when it is an indirect reference; a Length that cannot be read narrows the check to the marker sentence, since without it the payload end is a guess. The walk starts at object headers rather than at the keyword, so a compressed payload that happens to spell stream is never read as one, and only objects the cross-reference chain marks in use are judged: a file may carry a stray object its own table calls free, and a reader never reaches those bytes. When the chain cannot be read at all, every object is judged, since there is then no evidence that any of them is freepvaiTrailingDataAfterEof reports data after the last end-of-file marker. ISO 19005-1 6.1.3 requires it — “No data shall follow the last end-of-file marker except a single optional end-of-line marker” — and PDF/A-4 keeps the sentence, while ISO 19005-2 6.1.3 and ISO 19005-3 6.1.3 carry the same words as a note pointing at ISO 32000-1, so a part 2 or part 3 claim is not judged for it. The last marker counts, not the first: an incrementally updated file carries one per revision and only the last one ends the file. One end-of-line marker is taken as allowed, in any of the three shapes ISO 32000-1 7.5.5 accepts, and further white space after it is not data a reader would ever look atpvaiAlternatePresentationsPresent, pvaiPagePresStepsPresent and pvaiCatalogRequirementsPresent report the three keys ISO 19005-2 6.10 and 6.11 prohibit: an AlternatePresentations entry in the document name dictionary, a PresSteps entry in any page dictionary, and the Requirements key of the catalog. The note gives the reason for the first two — the slide show and the transition steps make the on-screen result differ from the printed page. PDF/A-4 states the same three sentences at 6.11 and 6.12, and ISO 19005-1 states none of them, so a part 1 claim is not judged. Each key is read where its clause names it: the name dictionary may be inline or reached through the catalog’s /Names reference, and every page dictionary is walkedpvaiExtGStateHtoPresent reports the /HTO key of an extended graphics state dictionary, which PDF 2.0 adds and ISO 19005-4 6.2.5 does not allow. Both the resource form and an indirect dictionary with /Type /ExtGState are read. The other parts have no such key to name — ISO 19005-1 and ISO 19005-2 speak of /HTP where part 4 speaks of /HTO — so the finding is emitted for a part 4 claim alonepvaiTrailerIdNotFileIdentifiers judges the value of the trailer /ID. ISO 19005-2 6.1.3 (and the same clause in ISO 19005-3 and ISO 19005-4) requires File Identifiers as ISO 32000-1 14.4 defines them: an array of two byte strings. Two empty strings, a single string, a bare string where an array belongs, and an array of any other size are reported. The lengths are deliberately not compared — the corpus passes files whose two strings are 15 and 16 bytes, or 16 and 64 — so the rule asks for two byte strings and not for two of one size. ISO 19005-1 6.1.3 requires only that the keyword be present, so a part 1 claim is not judged for the shape. The value is read from the newest section that states one, since an incremental update may omit the entry and let a reader inherit it from the section before, and the dictionary of a cross-reference stream is searched when the file has no trailer keywordpvaiPermissionsKeyNotAllowed reads the keys of the permissions dictionary the catalog’s /Perms entry points at. ISO 19005-2 6.1.12 (6.1.11 in PDF/A-4) allows UR3 and DocMDP and nothing else, so a third key is reported whether it stands alone or beside the allowed ones. Keys are compared as decoded names, and the dictionary may be written inline or as an object of its own. ISO 19005-1 never mentions a permissions dictionarypvaiNameNotValidUtf8 also covers structure type names. ISO 19005-2 6.1.8 (6.1.7 in PDF/A-4) names three classes that shall be valid UTF-8 after #-escapes are expanded: font names, colourant names of Separation and DeviceN spaces, and structure type names. The first two have their own walks; the third is the /S of a structure element and both halves of every RoleMap entry, whether that RoleMap is written inline in the structure tree root or as an object of its ownpvaiInlineImageFilterNotListed reports an inline image /F value that is not a filter name ISO 19005-2 6.1.10 (6.1.9 in PDF/A-4) allows. Both the full names of the filter table and the abbreviations the inline-image table carries are accepted, so Fl and FlateDecode both conform and only a spelling in neither list — Lzw, whose case no reader resolves — is reported. The LZW family and Crypt keep pvaiInlineImageLzwForbidden, so one defect is not reported twicepvaiFontWidthInconsistent reports a font the content shows text with whose dictionary width and embedded program width differ by more than one thousandth of a unit, which ISO 19005-1 6.3.6 and ISO 19005-2 6.2.11.5 (6.2.10.5 in PDF/A-4) require to agree. The comparison needs three facts. Which codes are shown comes from a walk that carries the text state: Tf names the font, Tr the rendering mode, and a show operator under mode 3 paints nothing, so its text is not counted. What the dictionary states is /Widths for a simple font and /W with /DW for a CID font. What the program states is read from its sfnt tables: hmtx holds the advance in font units, head the units per em that scales it into thousandths, and cmap the glyph a code reaches, in subtable formats 0, 4, 6 and 12. A code reaches its glyph through /Encoding, so a font that states a Differences array or no encoding at all is left alone, and so is a glyph the table does not map or a width the dictionary does not state. A Type 1 or CIDFontType0 program keeps its widths in the Type 2 charstrings of a compact font format program: the first number a charstring pushes is the width when the first stack-clearing operator receives one more argument than it takes, and the private dictionary’s defaultWidthX applies otherwise. That number is in charstring units, so the program’s FontMatrix scales it: the default one thousandth leaves it alone and a program built for a larger em states less. A simple font reaches a glyph by name through its encoding, which has to be WinAnsiEncoding or a Differences array this reader can follow, and a CIDFontType0 program is reached by CID through its charset, which only the Identity CMaps make equal to the code. A code the program does not carry, a name its charset does not list, an encoding this reader does not carry and a charstring it cannot follow all stay silent rather than guesspvaiGlyphMissingFromProgram reports a font whose embedded program does not carry a glyph the content shows text with, which ISO 19005-2 6.2.11.4.1 (6.2.10.4.1 in PDF/A-4) requires it to have. The glyph a code reaches is read the same way the width rule reads it: a Type 1 program names its glyphs in the charset and a CIDFontType0 one maps CIDs to them, so a name the charset does not list and a CID it does not reach are both missing glyphs, while a code the encoding leaves unnamed draws .notdef, which every program carries. A program this reader cannot open, and a font whose encoding it does not carry, stay silentpvaiEmbeddedFileParamsInvalid applies the PDF/A-3 Annex E.1 condition to each inspected active embedded file stream. A present Params must be a dictionary with a valid PDF ModDate string. Null and undefined Params values are equivalent to omission. Indirect values use the active object number and generation. Comparing the date with the original file's modification time requires external evidencepvaiEmbeddedFileGraphInvalid covers malformed PDF/A-3 RF dictionaries and name/stream pairs, including a related-file key without a corresponding filename and EF stream on the owner. Related stream references must resolve to the active generation. MIME and Params diagnostics also apply to related streamspvaiNotdefGlyphShown reports a text showing operator that draws the .notdef glyph, which ISO 19005-2 6.2.11.8 (6.2.10.9 in PDF/A-4) forbids in any content stream and “regardless of text rendering mode” — so this walk deliberately keeps the mode 3 show operators the font-embedding rule drops. Whether a code reaches .notdef is read from the font dictionary rather than from the font program: a simple font maps a byte through Encoding and a byte the encoding leaves unnamed is .notdef, while a composite font reached through an Identity CMap maps a two-byte code straight to a CID and a CID whose glyph id is zero is .notdef. The walk covers Tj, TJ, the quote operators, and the content of a Form XObject reached through Do. A built-in encoding, an embedded CMap and a CIDToGIDMap of an unknown shape are left silent rather than guessed at. A show string that ends with a lone byte under Identity-H or Identity-V cannot form a two-byte CID, so the reader resolves it to .notdef and the finding is reported; a custom CMap may use one-byte codes and is left alonepvaiIccOverprintModeOne reports content that paints in a four-component ICCBased colour space while overprint mode 1 is in force and the matching overprinting flag — OP for a stroke, op for a fill — is true, which ISO 19005-2 6.2.4.2 forbids and ISO 19005-4 6.2.4.2 repeats. The state is read in stream order: gs sets OPM, OP and op for the entries the dictionary carries, cs and CS name the fill and stroke spaces, rg, k and g replace them with a device space, Tr decides whether a show operator fills, strokes or both, and q and Q save and restore the whole state. A Form XObject reached through Do is walked with the state its invocation inherits; what the form leaves behind is not carried back, which can only under-reportpvaiIccProfileNotDistinct reports a CMYK ICCBased colour space that embeds the profile the page is already calibrated against — its OutputIntent’s DestOutputProfile, or the profile its transparency group names as the blending space — which ISO 19005-4 6.2.4.2 forbids. Two profiles count as identical when both references name one stream, when the decoded streams have the same bytes, or when they differ only inside the 16-byte Profile ID field and one side leaves that field empty; two non-zero Profile IDs that differ are two profiles, because the field is a checksum over the rest of the profile. The test is page-scoped, so a profile one page paints in and another page blends in is not reported, and a Separation or DeviceN space is judged by the alternate it names, since that is the profile the space embedspvaiJpxHeaderInvalid reports a JPEG2000 codestream whose header breaks one of the five conditions ISO 19005-2 6.2.8.3 states (6.2.7.3 in PDF/A-4): the number of colour channels shall be 1, 3 or 4; when the header holds more than one colr box and the image states no ColorSpace, exactly one shall carry APPROX 1; the METH value of the specification a reader uses shall be 1, 2 or 3; enumerated colour space 19 (CIEJab) shall not be used; and every channel’s bit depth shall lie between 1 and 38 with all channels equal. The last condition is read from BPC, or from the bpcc box that BPC 255 delegates to. The boxes are read from the decoded codestream rather than from the image dictionary, because a JPX image may carry no ColorSpace key at all and then its header is the only statement of what the samples meanpvaiActualTextPrivateUse reports an ActualText string holding a code point from the Unicode Private Use Area, as ISO 19005-4 6.2.10.8 requires. The entry is a text string, so the value is decoded first and only a UTF-16BE one — the form with the FE FF prefix — can carry such a code point at all; PDFDocEncoding has none. The entry appears both on a structure element and in the property list of a BDC operator, so both are read. Parts 1 to 3 state a different sentence about the same key: ISO 19005-2 6.2.11.7.3 requires the entry to be present when the text maps into the private use area, which is the opposite of banning one, so the ban is a part 4 rulepvaiAdditionalActionKeyNotPermitted reports an additional-actions dictionary that names a trigger key outside E, X, D, U, Fo and Bl. The entry itself is legal in PDF/A-4, where ISO 19005-4 6.6.3 replaces the ban of the earlier parts with that list for the document catalog, a page, and an annotation other than a Widget; a Widget annotation dictionary, and the field dictionary it belongs to, are out of scope for the whole clause. Parts 1 to 3 keep their own finding, pvaiAdditionalActions, and report the entry on the owners their clause names — a Widget annotation, a Field dictionary and the catalog in ISO 19005-1 6.6.2, plus the page from ISO 19005-2 6.5.2 on — rather than on every dictionary in the filepvaiAnnotationTypeNotPermitted reports an annotation subtype outside the part's permitted list. PDF/A-1 uses the sixteen types of PDF 1.4 Reference 8.4.5, parts 2 and 3 use the twenty-two types of ISO 32000-1 Table 169, and part 4 base, 4e and 4f permit twenty-two, twenty-four and twenty-three types from ISO 32000-2 Table 171. The list is case-sensitive and applies even when the active revision cannot be read. ISO 32000-1 defines Redact for PDF/A-2 and PDF/A-3, and ISO 32000-2 adds Projection for PDF/A-4pvaiAnnotationApDictViolation also checks the effective AP entries and distinguishes a normal appearance stream from the state dictionary required by a button widget. An indirect point rectangle qualifies for the appearance-presence exceptionpvaiForbiddenAnnotation reports subtypes explicitly restricted by the PDF/A profile. FileAttachment is allowed by the subtype rules for PDF/A-2, PDF/A-3 and PDF/A-4f. The independent attachment content, appearance and association rules still applypvaiAnnotationSubtypeUnchecked reports that the active page tree could not be inspected completely, so an annotation subtype decision cannot be trusted. Both subtype rules now follow the active /Annots references of each page: direct and indirect /Subtype names, escaped names, an omitted /Type, object-stream members and superseded revisions are resolved, while private dictionaries, lookalike keys and detached pages are ignored. A file whose active revision cannot be read at all keeps the conservative byte-level checks and reports this diagnostic when /Annots is presentpvaiEmbeddedFileMissingAFRelationship reports a missing or invalid AFRelationship name. ISO 19005-3 Table E.1 allows the predefined relationship names and custom names. The PDF/A-3 check accepts a valid indirect name in the active revisionpvaiEmbeddedFileMissingUF reports a missing or invalid F or UF string on a PDF/A-3 embedded file specification. The active name tree, associated-file arrays and file attachment references identify specifications that require a valid Type even when that entry is missing or malformedResources dictionary explicitly associated with that stream: pvaiInheritedContentResource reports a Tf, Do, gs, sh, cs / CS or scn / SCN operand whose name the owner's own Resources does not define. The owners judged are the page dictionary (never the page tree), an invoked Form XObject (never the invoking page) and a Type3 font for each of its CharProcs streams, and an owner carrying no Resources of its own violates only when a name is actually consumed. DeviceGray, DeviceRGB, DeviceCMYK and Pattern are built-in colour-space names that cs accepts without a Resources entry, a name before scn is accepted from either Pattern or ColorSpace, form recursion stops at a repeated object or a depth beyond 16, and /Properties names reached through BDC as well as annotation appearance streams stay out of scope; ISO 19005-1 6.2.2 governs OutputIntent instead, so PDF/A-1 stays silentpvaiPageStructParentsMissing judges the whole page dictionary, so a page is not reported merely because /Type precedes /StructParents. pvaiSubsetMissingCharSet and pvaiSubsetMissingCidSet apply to PDF/A-1 only: ISO 19005-2 6.2.11.4.2 requires a mapping that is present to be complete, not that one be present. pvaiAdditionalActions and pvaiJavaScriptPresent stop at part 3, because PDF/A-4 permits both, while a widget /A remains forbidden in every part; an optional-content configuration dictionary may carry an empty /Namestartxref names, and inherited along /Prev when a later section omits them, instead of from the last trailer keyword ahead of startxref. A linearized file points startxref at its first-page table near the top while the dictionary carrying /Root sits further on, and trailer is an ordinary word that also occurs inside strings - one 6.1.3 fixture quotes it in an outline title written after the real trailer - so the older search could read a title. ISO 32000-1 7.5.6 also lets an update trailer omit /Root, /Info and /Encrypt; a document of that shape is now identified as PDF/A instead of being reported as pacUnknown/Author(veraPDF Consortium) written without a space is compared with the equivalent XMP property instead of being mistaken for a non-text value and reported as pvaiInfoXmpValueMismatchpvaiMetadataFilterForbidden judges the object the document catalog names, and only in PDF/A-1: ISO 19005-1 6.7.2 constrains the catalog’s metadata stream dictionary, so a compressed metadata stream that a page carries and the Filter of an image an XObject metadata entry points at stay unreported, while ISO 19005-2 6.6.2.1, which dropped the sentence, is silent in every part from 2 onpvaiFormXObjectViolation and pvaiPostScriptOrRefXObject follow the same reachability rule the rest of PDF/A-1 uses: a form XObject with Subtype2 /PS or a PS key, a reference XObject with Ref and a PostScript XObject are reported only when the content invokes them through Do, because ISO 19005-1/Cor.2 exempts a named resource whose name the associated content stream never references. A form is also required to be an actual /Type /XObject stream, so a bare /Subtype /PS object is judged by 6.2.7 rather than by 6.2.5±32767 — the 16.16 fixed-point range, not the IEEE single range the table of ISO 32000-1 records — and a DeviceN colour space at 8 components, while ISO 19005-2 6.1.13 writes out ±3.403×1038 and 32. So pvaiRealImplementationLimit reports -32767.9 50 Td in PDF/A-1 and passes it in PDF/A-2, in objects and in content-stream operands alike, and pvaiDeviceNOverLimit reports the nine-colourant fixture of PDF/A-1 while the same colour space conforms from part 2 on. The real is compared by magnitude, not by how many digits follow the point: the note that a writer should stay within five decimal places is advice, so the fixture whose operand carries 65568 fractional digits conforms. The integer limit (2147483647 / -2147483648), the CID limit (65535) and the 28 levels of q/Q nesting are identical in the two tables and are therefore reported in every part — pvaiQRNestingOverLimit counts q and Q operators in each page content stream — a stack a generator splits across two streams is measured from zero in each, since summing the two would report a stream that closes what the previous one opened — and ignores the same letters inside strings, names, comments and inline imagespvaiStringOverLimit is part dependent: 65535 bytes in PDF/A-1, where ISO 19005-1 6.1.12 defers to Table C.1 of the PDF Reference, and 32767 bytes from PDF/A-2 on, where ISO 19005-2 6.1.13 states the number. The limit applies to the decoded string rather than to its text representation, in objects and in content streams alike%PDF-m.n of PDF Reference 7.5.2, so pvaiHeaderVersionInvalid reports %PDF-a.4, while %PDF-2.0 conforms in a PDF/A-1 claim: there the grammar fixes the shape of the number rather than its range, which is why a part 1 file may name a version that part does not describe. From part 2 the clause names the version instead of deferring to the grammar — ISO 19005-2 6.1.2 and ISO 19005-3 say %PDF-1.n with n a single digit from 0 to 7, followed by a single end-of-line marker — so %PDF-2.0, %PDF-1.9 and a version followed by spaces before the marker are all reported, while a lone CR counts as one marker just as CR LF does. PDF/A-4 builds on PDF 2.0 and its corpus passes %PDF-2.9 while rejecting %PDF-1.7, so only the major digit is judged there. The comment that follows the header carries a % and at least four characters above 127, judged from the four positions immediately after the % — a fifth character may be ASCII, but none of the first four may be, which is the difference between the veraPDF t02 pass and fail fixtures/CharSet and /CIDSet lists, not only whether the key is there. pvaiSubsetCharSetIncomplete reports a Type 1 subset descriptor whose /CharSet names no character at all, or leaves out a character name the shown text reaches, and pvaiSubsetCidSetIncomplete a CIDFont subset whose /CIDSet stream decodes to nothing, leaves out a CID the shown text reaches, or leaves out a CID that an explicit c [w…] entry of /W gives a width — a range entry is ignored, since one default width can cover CIDs the subset does not contain. ISO 19005-2 6.2.11.4.2 (6.2.10.4.2 in PDF/A-4) states the same completeness for a value that is present, so both values are judged in every part while the key itself is only required in PDF/A-1. The text side comes from the same content walk that answers the width and glyph-presence rules: a name is the one the font's encoding gives the code, taken from the WinAnsiEncoding table or from a /Differences array, and a CID is the code itself under an Identity CMap. Only what the file omits is judged — a /CharSet that names a glyph the subset does not hold is not reported, and 6-3-5-t02-pass-b conforms with a value that omits a glyph of its program, because its page paints none of itpvaiCidSystemInfoMismatch compares the Registry and Ordering strings of a composite font's CIDFont and of its CMap, which ISO 19005-1 6.3.3.1 requires to be identical unless the CMap is the predefined Identity-H or Identity-V. A CMap named by /Encoding has no dictionary to compare and is exempt; an embedded one carries its /CIDSystemInfo in the stream dictionary. ISO 19005-2 6.2.11.3.1 — and part 3 with it, and part 4 as 6.2.10.3.1 — add the third value, and it is ordered rather than compared: the Supplement of the CIDFont shall be greater than or equal to the CMap's, since a CIDFont that named an older supplement would lack glyphs for CIDs the CMap can produce. A CIDFont supplement of 1 against a CMap's 2 therefore conforms, and the same pair reversed does notpvaiXmpIdPrefixWrong reports a metadata packet that binds http://www.aiim.org/pdfa/ns/id/ to a prefix other than pdfaid, which ISO 19005-1 6.7.11 and ISO 19005-2 6.6.4 both require: the namespace identifies the schema, the prefix is how a reader following the clause finds the part number and the conformance level it holds, so a file that renames the prefix describes itself in a vocabulary that reader never looks forpvaiXmpIdPropertyUnknown reports a name the pdfaid: prefix carries that the identification schema does not define. ISO 19005-1 6.7.11 declares part and conformance and states the prefix rule for amd, which ISO 19005-1 Amd 1:2007 added, so a part 1 packet may carry those three; ISO 19005-2 6.6.4 added corr, and ISO 19005-4 added rev, so the known set depends on the part the packet itself declares and pdfaid:corr="2015" in a part 1 claim is reported while pdfaid:corr="1:2007" in a part 2 claim is not. A name quoted inside character data is not an attribute use — 6-7-2-t07-pass-a lists //pdfaid:part in xmp:Advisory, and the nearest < or > decides — and neither an xmlns: declaration nor a longer prefix that merely ends in pdfaid is judgedpvaiXmpPropertyUndeclared reports a property a packet draws from a namespace the predefined table does not list, when no extension schema in the same packet declares it for that namespace. ISO 19005-1 6.7.2 sends part 1 to the predefined schemas of XMP 2004 and ISO 19005-2 6.6.2.3.1 sends the later parts to the ones ISO 16684-1 defines; both require any other namespace to be described by a schema whose property list names what it covers, so a property outside that list has no schema behind it. A packet with no extension schema at all keeps pvaiMissingExtensionSchema, and a description written under a renamed prefix keeps pvaiExtensionSchemaPrefix, so one bundle names one faultpvaiType3WidthsInconsistent compares the /Widths entry of a Type 3 font with the width its glyph procedure states, which is the one font type whose embedded program a byte-level scan can read without a font parser: CharProcs procedures begin with d0 (wx wy) or d1 (wx wy llx lly urx ury), and ISO 19005-1 6.3.6 requires the two numbers to agree, ISO 19005-2 6.2.11.5 and ISO 19005-4 6.2.10.5 within 1/1000 unit. Both sides are in glyph space, so the comparison applies the FontMatrix scale that takes them into text space rather than assuming 0.001. The code-to-name map comes from the /Differences array of the font’s Encoding, which is the shape a Type 3 font is required to carry; a font whose encoding is a name, whose /Widths element is not a number or whose procedure carries no d0/d1 is left unjudged rather than assumed. TrueType, Type 1 and CFF programs are out of scope, since their widths live in tables this scan does not parsepvaiIndirectObjectLayoutInvalid reports the four layout sentences of ISO 19005-1 6.1.8 and ISO 19005-2 6.1.9: a single white-space character between the object number and the generation number, a single one between the generation number and obj, an end-of-line marker ahead of the object number and ahead of endobj, and one after obj and after endobj. It judges the objects the cross-reference chain marks in use, at the offsets the chain records, so an object no entry names is not examined. It also runs on the bytes as they were read, before object streams are expanded — expansion rewrites the buffer and the recorded offsets then point at bytes that no longer hold a header, which turns the whole check into a silent no-op. An offset is allowed to sit on whitespace ahead of the object number, since a writer may record the end-of-line marker itself, so the test starts at the first digit of the number rather than at the offset. Both chain forms are read: a classic xref table and a cross-reference stream, where a type 2 entry marks an object stored inside an object stream that therefore has no header to judgepvaiExtGStateRenderingIntentInvalid is not a part 2 rule. ISO 19005-1 6.2.8 defers the RI key to 6.2.9 and ISO 19005-2 6.2.5 defers it to 6.2.6, so the four names are the whole vocabulary in every part; both a dictionary written inline in a /ExtGState resource and one kept in its own object are judged, reached through the resources or by their /Type entryQ followed by one opening with q is two operators, not the undefined Qq, and no longer reports pvaiUndefinedContentOperatorpvaiTransparentColorSpace compares an ExtGState CA or ca value with 1.0 numerically at a tolerance of 1e-6 rather than by matching the literal text, so a value that a generator rounded through a six-decimal representation - 1.0000001 or 0.9999999 - is opaque, while 0.5, 0.9 and 0 are not. The same comparison accepts 1.00, 1. and +1pvaiCidFontMissingCidToGidMap applies to a Type 2 CIDFont whose glyphs the content actually paints: the CIDFont is reached through the composite font the used-for-rendering scan resolves from Tf, so a font shown exclusively in text rendering mode 3, which 6.3.4 exempts, needs no glyph map. The entry being present is not enough either — ISO 32000-1 Table 117 allows only a stream mapping CIDs to glyph indices or the name /Identity, so a name the file does not define (the 6-2-11-3-2-t01-fail-c fixture writes a bare /) and any other name are reported as wellpvaiCmapNotEmbedded reports a composite font that names a CMap instead of embedding it, where no table lists that name. ISO 19005-1 6.3.3.3 writes the exception as the identity pair alone — “except Identity-H and Identity-V” — while ISO 19005-2 6.2.11.3.3, ISO 19005-3 and ISO 19005-4 6.2.10.3.3 defer to the predefined table (ISO 32000-1 Table 118, carried into ISO 32000-2 Table 116), so the same /Encoding /GBK-EUC-H conforms from part 2 on and would not conform in part 1. The table holds 61 names: the 14 simplified-Chinese, 14 traditional-Chinese, 20 Japanese and 11 Korean CMaps plus Identity-H and Identity-V. Only a name is judged; a stream /Encoding is embedded by definitionpvaiCmapWModeMismatch reports an embedded CMap whose dictionary and whose own stream state different writing modes. The clause asks for the integer WMode of the CMap dictionary to be identical to the one in the CMap stream, where the stream writes it as /WMode n def in its definition section. The stream is decoded to be read, so the dictionary value is read first and a CMap that states none costs no decode; with nothing on one side there is nothing to compare and the file is left alonepvaiCmapUseCmapNotPredefined reports a CMap that reaches another one through usecmap where the target is not listed in that same table, which parts 2 to 4 forbid in the sentence that follows. A dictionary states the target as /UseCMap, either as a name or as a reference; a reference is resolved to the /CMapName the object states, so an embedded CMap that inherited from another embedded one is judged by the name it declares rather than by the fact that it exists. ISO 19005-1 6.3.3.3 has no counterpart sentence, so the rule applies from part 2 onpvaiToUnicodeForbiddenValue reads what a ToUnicode CMap maps to, not merely that it exists. ISO 19005-2 6.2.11.7.2 and ISO 19005-3 require every Unicode value in it to be greater than zero and to be neither U+FEFF nor U+FFFE, and the note says why: those three are what a writer emits when it has nothing to say, one filling a hole and the other two being the byte order marks, which name an encoding rather than a character. Every other value conforms, a private-use or unassigned code included, so the scan looks for these three alone. beginbfchar and both shapes of beginbfrange entry are walked — one destination shared by the range, or an array holding one per code — and a destination string carrying several characters is judged unit by unit. The clause belongs to ISO 19005-2 and ISO 19005-3, whose 6.2.11.7.1 confines the whole of 6.2.11.7 to Level A and Level U and lets a Level B writer ignore it, so a PDF/A-2b or PDF/A-3b claim is not judged; ISO 19005-1 states no such sentence at any level, its 6.3.8 asking only that the entry be present; and PDF/A-4 keeps a single base level, so every part 4 file is in scope, which is how that profile’s own 6-2-10-7-t01 fixtures readpvaiXrefSubsectionHeaderSpacing and pvaiXrefKeywordSeparator enforce the two layout sentences of 6.1.4. A subsection header separates the starting object number from its range with a single SPACE character (20h), and the xref keyword is followed by exactly one end-of-line marker — a CRLF pair counts as one, an extra LF or a space ahead of it does not. Only the second sentence survives into ISO 19005-2 6.1.4, so the spacing rule is reported for PDF/A-1 alone, which is also why PDF/A-2b numbers its two groups of fixtures one lower than PDF/A-1b does. Both are read from the chain the trailer’s /Prev entries describe, so a revision that hides the fault in an earlier section is still caught6-1-4-t03-pass-b — whose object 18 is the whole of <AF9> while its table entry reads f — conforms. The map comes from classic tables only: a cross-reference stream keeps its entries in a binary layout the walker does not decode, and a file that has one leaves every object in scope rather than exempting objects it cannot place<?xpacket or <x:xmpmeta token. TPdfXmpPacket.ParseBytes is the entry point, with PdfXmpPacketEncoding and PdfXmpPacketText for callers that scan a packet rather than parse it. This is what makes the 6.7.9 fixtures legible - they carry pdfaid:part, the dates and the conformance level in UTF-16 and UTF-32 in both byte orders, and every one of them conforms - while PDF/A-4, whose metadata streams take their grammar from ISO 16684-1, reports a packet in any other encoding as pvaiXmpPacketNotUtf8; parts 1 to 3 accept all four encodingspvaiMissingXmpMetadata means the catalog /Metadata key is absent, unreadable, or does not resolve to a stream dictionary with /Type /Metadata and /Subtype /XMLpvaiPdfA1Pdf15Structure reports PDF/A-1 documents that contain PDF 1.5 cross-reference streams or object streams; these structures remain valid for PDF/A-2 and PDF/A-3pvaiInlineImageLzwForbidden applies to inline-image filters in every PDF/A part: PDF/A-1 rejects /LZWDecode and PDF/A-2 / PDF/A-3 also reject inline-image /LZW, /LZWDecode, and /Crypt filter valuespvaiImageDictionaryViolation also covers PDF/A-2 and PDF/A-3 inline images whose /I or /Interpolate value is true, in addition to Image XObject /Alternates, /OPI, and /Interpolate true dictionary violationspvaiAnnotationApDictViolation covers both malformed annotation appearance dictionaries whose /AP entry contains keys other than /N and annotations that require but lack an appearance dictionarypvaiAnnotationFlagsViolation, pvaiAnnotationToggleNoView, pvaiAnnotationDictViolation and pvaiAnnotationApDictViolation are decided for dictionaries reached through the active page /Annots array. That includes the button rule of ISO 19005-2 and ISO 19005-3 clause 6.3.3: a /FT /Btn widget shall carry its normal appearance as a subdictionary keyed by appearance state, not as a plain stream. The field type is resolved through the /Parent chain, so a widget that is a separate object from its field is covered too. A private lookalike dictionary is not an annotation; when the active revision cannot be read, the conservative file-wide byte scans still applypvaiWidgetActionForbidden follows the same ownership rule. A Widget annotation reached through the active /Annots array is reported when it carries /A, or /AA before part 4; PDF/A-4 permits the widget /AA dictionary. An object outside /Annots is not a widget annotation and is not reportedpvaiInfoXmpValueMismatch reports at least one present Info value whose mapped XMP property is absent, has the wrong RDF container shape, differs as Unicode text, contains an invalid date, or represents a different UTC instant. The standalone byte-level ValidatePdfACompliance raises it as well, for an explicit PDF/A-1 claim only: ISO 19005-1 §6.1.5 defers to §6.7.3, while ISO 19005-2 §6.7.3 demotes the same crosswalk to a writer recommendation and requires a reader to ignore the Info dictionary, so PDF/A-2 and later stay silent. Along that path an indirect Info value is resolved and literal and hexadecimal strings are decoded — a FE FF byte order mark selects UTF-16, everything else PDFDocEncoding — before the comparison; a value that resolves to null counts as absent, and a value that is not a text string at all is a mismatch. The Subject entry is compared with dc:description, not with the dc:subject Table 1 of ISO 19005-1 prints: TN0008 records that cell as an error in the first edition and ISO 19005-2 replaced itConformance is a real PDF/A level and Issues is emptyValidatePdfA is a read-only inspection — it does not modify
the document and is safe to call repeatedly. Use it before handing a
PDF off to an archive system to surface non-compliance to the
operator. For the common "what level is this?" check that doesn't
need the issue list, prefer the lighter-weight
PdfAConformance property
Conformance = pacNone and an empty Issues array
uses System.TypInfo;
var
Outcome: TPdfAValidationResult;
Issue: TPdfAValidationIssue;
begin
Pdf1.FileName := 'C:\Incoming\report.pdf';
Pdf1.Active := True;
Outcome := Pdf1.ValidatePdfA;
Memo1.Lines.Add('Level: ' + GetEnumName(TypeInfo(TPdfAConformance),
Ord(Outcome.Conformance)));
for Issue in Outcome.Issues do
Memo1.Lines.Add('- ' + GetEnumName(TypeInfo(TPdfAValidationIssue), Ord(Issue)));
end;
Integer implementation-limit checks use lexical PDF tokens, excluding comments, literal and hexadecimal strings, names and real numbers; signed 32-bit boundaries and leading zeros are handled without integer overflow
Since v3.256.0, PDF/A-4 checks the required pdfaid:rev=2020, strict present conformance values, required 4f EmbeddedFiles names and bounded name-tree ownership, the Info/PieceInfo relationship and the sole permitted Info ModDate entry. PDF/A-4e uses engineering rules and has no Level A structure gate or downgrade
Base PDF/A-4 embedded files are checked recursively against the selected PDF/A-1/2/4 rules, with limits of four attachment levels, 32 distinct checked streams, 16 MiB decoded bytes per stream and 64 MiB aggregate decoded payload. Unsupported or exhausted inspection remains observable through pvaiEmbeddedPdfAUnchecked; malformed ownership uses pvaiEmbeddedFileGraphInvalid
A Form XObject or Type 3 font that omits /Resources inherits the resource dictionary of the active page, including one inherited from a page-tree ancestor (ISO 32000-1 Table 95 and 7.8.3). Its marked-content /AF scopes are resolved against that dictionary, so an associated file is classified as associated or unassociated instead of leaving the candidate unchecked. pvaiEmbeddedPdfAUnchecked remains for content that cannot be decoded, an unreadable active revision and exhausted traversal budgets. The page resource dictionary is resolved before /Annots is walked, so an annotation appearance stream without /Resources uses that same context. A tiling pattern without /Resources keeps the fail-closed policy because Table 75 requires that entry
New issues preserve existing enum ordinals: pvaiPdfA4RevisionInvalid, pvaiPdfAIdentifierInvalid, pvaiPdfA4EmbeddedFilesMissing, pvaiPdfA4InfoWithoutPieceInfo, pvaiPdfA4InfoInvalid, pvaiEmbeddedPdfANonConforming, pvaiEmbeddedPdfAUnchecked, pvaiEmbeddedFileGraphInvalid and pvaiPdfA4Engineering3DInvalid
Selected built-in checks and a detected marker do not establish full PDF/A conformity, child-document certification or valid 3D model content; independent profile validation and domain review remain required