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
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
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
HasWarnings
Gets a value indicating whether any finding is a warning.
public bool HasWarnings { get; }
Property Value
InformationCount
Gets the number of information findings, kept or not.
public int InformationCount { get; }
Property Value
ProfileName
Gets the name of the profile the document was validated against, such as structural.
public string ProfileName { get; }
Property Value
ProfileVersion
Gets the version of that profile.
public int ProfileVersion { get; }
Property Value
SuppressedCount
Gets the number of findings not kept because PdfValidatorOptions.FindingCapacity was reached.
public int SuppressedCount { get; }
Property Value
WarningCount
Gets the number of warning findings, kept or not.
public int WarningCount { get; }
Property Value
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
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
A string that represents the current object.