Skip to main content

Class PdfValidationRuleIds

Namespace: AdCodicem.Pdf.Validation
Assembly: AdCodicem.Pdf.dll

The identifiers of the validation rules. They are part of the public contract: callers filter on them and repair keys its remedies off them, so renaming one is a breaking change once a stable release carries it.

public static class PdfValidationRuleIds

Inheritance​

object ← PdfValidationRuleIds

Inherited Members​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Remarks​

An identifier is family.name, both in lowercase kebab case. The family is never a profile's name, since a rule runs in every profile that includes it. One identifier names one rule, which always reports at the same severity, and no identifier equals one of PdfDiagnosticCodes: findings and diagnostics are different things. docs/website/docs/reference/validation-rules.md lists every identifier.

Fields​

FileEofMissing​

No %%EOF marker in the last 1,024 bytes of the file: the file was cut short, or something was appended after its end. PdfValidationSeverity.

public const string FileEofMissing = "file.eof-missing"

Field Value​

string

FileHeaderMissing​

No %PDF- header in the first 1,024 bytes of the file, where readers look for it: some refuse the file. PdfValidationSeverity.

public const string FileHeaderMissing = "file.header-missing"

Field Value​

string

FileHeaderOffset​

The %PDF- header does not start at the file's first byte: something precedes it. PdfValidationSeverity.

public const string FileHeaderOffset = "file.header-offset"

Field Value​

string

FileHeaderVersionInvalid​

The header names no version of PDF — 1.0 to 1.7, or 2.0. PdfValidationSeverity.

public const string FileHeaderVersionInvalid = "file.header-version-invalid"

Field Value​

string

FileRootInvalid​

The trailer's /Root is missing, is not a reference, or does not lead to a document catalog. PdfValidationSeverity.

public const string FileRootInvalid = "file.root-invalid"

Field Value​

string

FileSizeWrong​

A section's /Size is missing, or is not one more than the highest object number the section and those it updates use. PdfValidationSeverity.

public const string FileSizeWrong = "file.size-wrong"

Field Value​

string

FileStartXRefMissing​

No startxref followed by an offset at the end of the file: the file gives no way into its cross-reference index, which readers rebuild each in their own way. PdfValidationSeverity.

public const string FileStartXRefMissing = "file.startxref-missing"

Field Value​

string

FileStartXRefWrong​

The offset startxref gives holds no cross-reference section. PdfValidationSeverity.

public const string FileStartXRefWrong = "file.startxref-wrong"

Field Value​

string

FileTrailerMalformed​

A trailer is not a well-formed dictionary. PdfValidationSeverity.

public const string FileTrailerMalformed = "file.trailer-malformed"

Field Value​

string

FileTrailerMissing​

A cross-reference table is not followed by its trailer: the trailer keyword is missing. PdfValidationSeverity.

public const string FileTrailerMissing = "file.trailer-missing"

Field Value​

string

FileTrailerValueWrong​

A value a section's trailer — a classic table's, or a cross-reference stream's dictionary — gives the reader to read the chain is written as the specification does not allow, and read all the same: a reference where it must be direct, a real with no fractional part where it must be an integer. PdfValidationSeverity.

public const string FileTrailerValueWrong = "file.trailer-value-wrong"

Field Value​

string

ObjectEndObjMissing​

An object reachable from the trailer does not end with endobj. PdfValidationSeverity.

public const string ObjectEndObjMissing = "object.endobj-missing"

Field Value​

string

ObjectKeyDeprecated​

An object reachable from the trailer has a key the Arlington PDF Model says the version the file declares deprecates. PdfValidationSeverity.

public const string ObjectKeyDeprecated = "object.key-deprecated"

Field Value​

string

ObjectKeyMissing​

An object reachable from the trailer lacks a key the Arlington PDF Model requires of its type in the version the file declares, or an array lacks an element it requires. PdfValidationSeverity.

public const string ObjectKeyMissing = "object.key-missing"

Field Value​

string

ObjectNameNullCharacter​

An object reachable from the trailer holds a name with a null character, written #00, which a name cannot contain. PdfValidationSeverity.

public const string ObjectNameNullCharacter = "object.name-null-character"

Field Value​

string

ObjectReferenceMissing​

An object reachable from the trailer refers to an object the file lacks — none in its index, or a free entry —, which reads as null. PdfValidationSeverity.

public const string ObjectReferenceMissing = "object.reference-missing"

Field Value​

string

ObjectTypeValueWrong​

The /Type or /Subtype of an object reachable from the trailer is a name the Arlington PDF Model does not list for its type. PdfValidationSeverity.

public const string ObjectTypeValueWrong = "object.type-value-wrong"

Field Value​

string

ObjectValueTypeWrong​

A value of an object reachable from the trailer is of a type the Arlington PDF Model does not allow for its key — a string where an integer belongs, a stream where a dictionary does. PdfValidationSeverity.

public const string ObjectValueTypeWrong = "object.value-type-wrong"

Field Value​

string

PageTreeCountMismatch​

A node of the page tree has no /Count, or one that is not the number of pages below it. PdfValidationSeverity.

public const string PageTreeCountMismatch = "page-tree.count-mismatch"

Field Value​

string

PageTreeCycle​

A kid of the page tree loops back to the node listing it or to a node above it: what the tree should have listed there is unknown. PdfValidationSeverity.

public const string PageTreeCycle = "page-tree.cycle"

Field Value​

string

PageTreeKidInvalid​

A kid of the page tree is null, names an object the file lacks, is a stream, is neither a page nor a node, or is written in the array rather than referred to. PdfValidationSeverity.

public const string PageTreeKidInvalid = "page-tree.kid-invalid"

Field Value​

string

PageTreeKidsMissing​

A node of the page tree has no /Kids array, so lists no page. PdfValidationSeverity.

public const string PageTreeKidsMissing = "page-tree.kids-missing"

Field Value​

string

PageTreeMediaBoxInvalid​

A page has no /MediaBox, its own or inherited, or one that is not a rectangle of four numbers enclosing an area. PdfValidationSeverity.

public const string PageTreeMediaBoxInvalid = "page-tree.mediabox-invalid"

Field Value​

string

PageTreeNodeRepeated​

A kid of the page tree names a node or a page the tree lists elsewhere, which counts each time it is listed. PdfValidationSeverity.

public const string PageTreeNodeRepeated = "page-tree.node-repeated"

Field Value​

string

PageTreePageOrphaned​

An object of /Type /Page, with a /Parent or /Contents, that the page tree does not list: no reader shows it. PdfValidationSeverity.

public const string PageTreePageOrphaned = "page-tree.page-orphaned"

Field Value​

string

PageTreeParentWrong​

A node or a page has no /Parent, or one that is not the node listing it; or the root has one. PdfValidationSeverity.

public const string PageTreeParentWrong = "page-tree.parent-wrong"

Field Value​

string

PageTreeResourcesMissing​

A page has no /Resources, its own or inherited. PdfValidationSeverity.

public const string PageTreeResourcesMissing = "page-tree.resources-missing"

Field Value​

string

XRefChainLoop​

The chain of cross-reference sections names a section it has already read, or an offset it has already named, and the sections before the loop are out of reach. PdfValidationSeverity.

public const string XRefChainLoop = "xref.chain-loop"

Field Value​

string

XRefCheckedInPart​

Part of the index could not be checked: one of the reader's limits stopped it, or the document is encrypted and its object streams are readable only once decrypted. PdfValidationSeverity.

public const string XRefCheckedInPart = "xref.checked-in-part"

Field Value​

string

XRefEntryBroken​

An in-use entry places its object where it is not, nor near it; or in an object stream that does not hold it. PdfValidationSeverity.

public const string XRefEntryBroken = "xref.entry-broken"

Field Value​

string

XRefEntryShifted​

An in-use entry places its object a few bytes from where it is, or at another index of its object stream. PdfValidationSeverity.

public const string XRefEntryShifted = "xref.entry-shifted"

Field Value​

string

XRefGenerationMismatch​

An entry's generation is not the one its object is written with: readers that match generations read the object as missing. PdfValidationSeverity.

public const string XRefGenerationMismatch = "xref.generation-mismatch"

Field Value​

string

XRefObjectPastSize​

In-use objects are numbered above the trailer's /Size, which the specification makes a conforming reader ignore — reported once for the file. PdfValidationSeverity.

public const string XRefObjectPastSize = "xref.object-past-size"

Field Value​

string

XRefObjectStreamBroken​

An object stream entries place objects in is missing, is not an object stream, or cannot be read. PdfValidationSeverity.

public const string XRefObjectStreamBroken = "xref.object-stream-broken"

Field Value​

string

XRefObjectStreamCircular​

An object stream needs, to be read, an object that only reading it — or another stream that needs it in turn — can give: its /Length, /Filter, /DecodeParms, /N or /First names an object it holds. PdfValidationSeverity.

public const string XRefObjectStreamCircular = "xref.object-stream-circular"

Field Value​

string

XRefObjectStreamValueWrong​

An object stream gives its /N, /First or /Length as a real number with no fractional part, where the specification asks for an integer, and is read all the same. PdfValidationSeverity.

public const string XRefObjectStreamValueWrong = "xref.object-stream-value-wrong"

Field Value​

string

XRefOffsetImprecise​

Offsets of the file name the white space before what they designate rather than its first byte — reported once for the file. PdfValidationSeverity.

public const string XRefOffsetImprecise = "xref.offset-imprecise"

Field Value​

string

XRefSectionMalformed​

A cross-reference section the chain names is there and cannot be read, holds fewer rows than it declares, or has a row that gives an object in use what no entry can hold. PdfValidationSeverity.

public const string XRefSectionMalformed = "xref.section-malformed"

Field Value​

string

XRefSectionNotFound​

A cross-reference section a /Prev or an /XRefStm names is neither there nor near it, or what names it is not an offset. PdfValidationSeverity.

public const string XRefSectionNotFound = "xref.section-not-found"

Field Value​

string

XRefSectionShifted​

A cross-reference section a /Prev or an /XRefStm names starts a few bytes from where it is named. PdfValidationSeverity.

public const string XRefSectionShifted = "xref.section-shifted"

Field Value​

string