Enum PdfCheck
- Namespace
- PDiffy
- Assembly
- PDiffy.dll
A rule Check(params PdfCheck[]) can apply: the mistakes generated documents make that keep them from being accessible or tidy. These are fast regression checks, not a PDF/UA validator such as veraPDF or PAC.
public enum PdfCheck
Fields
DocumentLanguage = 0The document declares a language, so a screen reader reads it with the right voice.
DocumentTitle = 1The document has a title, and the viewer shows it instead of the file name.
FigureAltText = 2Every figure has alt text or replacement text.
UntaggedContent = 3All text, images and paths are tagged or marked as artifacts, so none is hidden from a screen reader.
LinkDescriptions = 4Every link has a description in its contents (/Contents), as PDF/UA asks, even when the element that tags it has text or alt text.
FormFieldNames = 5Every form field has an accessible name: its tooltip (TU), or alt text on the Form element of each of its widgets.
TableHeaders = 6Every table header has a scope or is named by the cells under it, and no cell names a header that doesn't exist.
HeadingLevels = 7Heading levels don't skip: the first heading is H1, and no H3 comes straight after an H1.
FontsEmbedded = 8Every font is embedded, so the text looks the same everywhere.
FontsMapToUnicode = 9Every character code a font's text uses maps to Unicode, so the text can be copied, searched and read aloud.
NoActions = 10The document has no JavaScript, runs no actions on events such as closing or printing, and does nothing when it opens except go to a page.
NoEmbeddedFiles = 11The document has no embedded files.
RoleMap = 12Every custom structure type maps to a standard one, no mapping loops back on itself, and no standard type is remapped, so assistive technology knows what each element is.
XmpMetadata = 13The document has XMP metadata that says it's PDF/UA-1, with the "pdfuaid" prefix PDF/UA names, and gives its title (dc:title) as a list of language versions. DocumentTitle also accepts the Info dictionary's title, which viewers show.
TaggedPdf = 14The document is marked as tagged, doesn't say its tags may be unreliable (Suspects), has a structure tree, every structure element has a parent entry that names the element that lists it, and no child is listed twice.
PdfVersion = 15The file header and any catalog /Version say 1.0 to 1.7, the versions PDF/UA-1 builds on.
ListStructure = 16List items sit in lists and list bodies in list items; a list holds only lists, items and a caption, which comes first; an item holds only a label and a body.
TocStructure = 17Table of contents items sit in a table of contents, which holds only tables of contents, items and a caption, which comes first.
HeadingTypes = 18The document uses unnumbered headings (H) or numbered ones (H1 to H6), not both, and no element, nor the structure tree root, holds more than one H.
NoteIds = 19Every note (footnote or endnote) has an ID, and no two notes share one.
TableStructure = 20Rows, cells and row groups sit where a table has them and hold only what they can. A table has at most one THead, TFoot and Caption, has a TBody when it has a THead or TFoot, and puts its caption first or last.
TableGrid = 21A table's cells line up, counting their row and column spans: no two overlap, none spans past the last row, and every row has as many columns as the first.
AnnotationTags = 22Each annotation is tagged with the element for it: a link with Link, a form field's widget with Form, any other with Annot. A Form that sets no field role holds one widget and nothing else, there are no TrapNet annotations, and printer marks aren't tagged.
AnnotationDescriptions = 23Every annotation but links and form fields has a description: its contents, or alt text on the element that tags it. LinkDescriptions covers links.
TabOrder = 24Every page with annotations has its tab order follow the structure (S).
LanguageTags = 25Every language the document, its structure elements and its marked content set is a well-formed language tag, such as "en-US", not "english" or "en_US".
TextLanguage = 26In a document with no language of its own, every piece of text still has one: from the element it's in, an element around it, or the marked content that covers it. Bookmark titles, and XMP metadata for the default language, need the document's.
FormulaAltText = 27Every formula has alt text or replacement text.
MediaClips = 28Every media clip, such as a video a Screen annotation plays, has a content type and alternate text.
ArtifactNesting = 29No artifact sits inside tagged content, and no artifact holds tagged content.
LayerConfigurations = 30Every optional-content configuration has a name and doesn't turn layers on or off by itself (/AS).
EmbeddedFileNames = 31Every file in the document's list of embedded files has a specification that names it both as /F and as /UF.
NoDynamicXfa = 32The document has no dynamic XFA form, which builds its pages as it opens.
AccessibilityPermission = 33An encrypted document lets assistive technology extract its text.
NoReferenceXObjects = 34No reference XObject, which shows a page of another file, is in the pages' resources or the forms in them.
MeaningfulAltText = 35A warning: no alt text is a file name, such as "IMG_2041.jpg", or a placeholder such as "image" or "graphic 3", which pass FigureAltText but say nothing.
LinkText = 36A warning: no link says only something vague, such as "click here", "read more" or "link", which passes LinkDescriptions but doesn't say where the link goes.
NoMissingGlyphs = 37No text shows a font's .notdef glyph, the empty box drawn for a character the font lacks, judged by the font's encoding, CID-to-glyph map or embedded TrueType, Type 1 or CFF program.
FontDictionaries = 38No Type 0 or TrueType font's dictionaries break a PDF/UA rule: a Type 0 font's CMap and CIDSystemInfo agree, an embedded TrueType-based CID font has a CIDToGIDMap, each CMap is built in or embedded, an embedded CMap gives one writing mode and uses only built-in CMaps, and a TrueType font's encoding is one PDF/UA allows. PdfFontProblem lists them.
FontPrograms = 39No embedded TrueType, Type 1 or CFF program disagrees with its font: glyph widths match the font dictionary's, a CID font's CIDSet and a Type 1 font's CharSet list every glyph the program has, a TrueType program's cmaps suit the font, and the program can be read. PdfFontProblem lists them; a glyph the program lacks is found by NoMissingGlyphs.
ReadingOrder = 40A warning: no paragraph, heading, list item or table cell is read after one below it in the same column of the same page, such as a paragraph read before the heading above it. Footnotes and captions don't count, and a table's cells are compared only with each other.
ParentTree = 41The structure tree has a parent tree whose keys are unique, in order and below ParentTreeNextKey, and its entries point back at the elements that own each page's marked content and each tagged annotation, so assistive technology can find the tag of what it's reading.