Skip to main content

Struct PdfValidationLocation

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

Where a validation finding applies: an object of the document, a byte offset in the file, a page, or several of these. The default value designates the document as a whole.

public readonly record struct PdfValidationLocation : IEquatable<PdfValidationLocation>

Implements​

IEquatable<PdfValidationLocation>

Inherited Members​

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

Remarks​

A finding nobody can locate is not actionable, so every rule says where it looked. A finding about a page, or about an object a page holds, gives the page too.

Properties​

IsDocument​

Gets a value indicating whether the location designates the document as a whole.

public bool IsDocument { get; }

Property Value​

bool

Object​

Gets the object the finding concerns, or null when it concerns no single object.

public PdfObjectId? Object { get; }

Property Value​

PdfObjectId?

PageIndex​

Gets the zero-based index of the page the finding concerns, in the order of the page tree, or null when it concerns no single page.

public int? PageIndex { get; }

Property Value​

int?

Remarks​

Pages are counted as the page tree lists them: a kid that is null, or that names an object the file lacks, takes the place of a page. PdfValidationLocation.ToString() writes the page as people number it, from 1.

Position​

Gets the byte offset in the file the finding relates to, or null when it relates to no position. An offset equal to the file's length designates its end.

public long? Position { get; }

Property Value​

long?

Methods​

ToString()​

Returns the fully qualified type name of this instance.

public override string ToString()

Returns​

string

The fully qualified type name.