Skip to main content

Class PdfValidationReport

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

What a validation profile found in a document: the findings in the order they were found, and how many there were of each severity.

public sealed class PdfValidationReport

Inheritance​

object ← PdfValidationReport

Inherited Members​

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

Remarks​

The report is bounded: it keeps at most [PdfValidatorOptions.FindingCapacity](AdCodicem.Pdf.Validation.PdfValidatorOptions#AdCodicem_Pdf_Validation_PdfValidatorOptions_FindingCapacity) findings, so a hostile file with a fault in every object cannot make it grow without limit. The counts by severity, and [PdfValidationReport.Contains\(string\)](AdCodicem.Pdf.Validation.PdfValidationReport#AdCodicem_Pdf_Validation_PdfValidationReport_Contains_System_String_), cover every finding, kept or not; [PdfValidationReport.SuppressedCount](AdCodicem.Pdf.Validation.PdfValidationReport#AdCodicem_Pdf_Validation_PdfValidationReport_SuppressedCount) says how many were not kept.

Two validations of the same document under the same profile give the same report: rules run in the profile's order and report in the order they find, and nothing in a report depends on the time or on the machine.

Properties​

ErrorCount​

Gets the number of error findings, kept or not.

public int ErrorCount { get; }

Property Value​

int

Findings​

Gets the findings kept, in the order they were found.

public IReadOnlyList<PdfValidationFinding> Findings { get; }

Property Value​

IReadOnlyList<PdfValidationFinding>

HasErrors​

Gets a value indicating whether any finding is an error: the reader cannot vouch that it reads the document as it was written.

public bool HasErrors { get; }

Property Value​

bool

HasWarnings​

Gets a value indicating whether any finding is a warning.

public bool HasWarnings { get; }

Property Value​

bool

InformationCount​

Gets the number of information findings, kept or not.

public int InformationCount { get; }

Property Value​

int

ProfileName​

Gets the name of the profile the document was validated against, such as structural.

public string ProfileName { get; }

Property Value​

string

ProfileVersion​

Gets the version of that profile.

public int ProfileVersion { get; }

Property Value​

int

SuppressedCount​

Gets the number of findings not kept because PdfValidatorOptions.FindingCapacity was reached.

public int SuppressedCount { get; }

Property Value​

int

WarningCount​

Gets the number of warning findings, kept or not.

public int WarningCount { get; }

Property Value​

int

Methods​

Contains(string)​

Determines whether a rule reported anything, whether or not its findings were kept.

public bool Contains(string ruleId)

Parameters​

ruleId string

One of PdfValidationRuleIds.

Returns​

bool

ToString()​

Returns a string that represents the current object.

public override string ToString()

Returns​

string

A string that represents the current object.