Validates PDF documents against archival (PDF/A) and accessibility (PDF/UA) conformance standards.
The validator only accepts documents whose underlying type is PDF; other formats are rejected and are never converted implicitly. By default the document is validated against the conformance level it claims in its metadata. Set the Conformance property to force validation against a specific conformance level instead.
from nutrient_sdk import PdfValidatorConstruction
PdfValidator cannot be instantiated directly. Obtain instances through static factory methods or via other SDK classes.
Class Methods
set
@classmethoddef set(cls, document: Document) -> PdfValidatorCreates a PdfValidator instance for the specified document.
Parameters:
| Name | Type | Description |
|---|---|---|
document | Document | The PDF document to validate. |
Returns: PdfValidator - A PdfValidator instance ready to validate the document.
Methods
validate
def validate(self) -> PdfValidationResultValidates the document against the conformance level specified by the Conformance property.
Returns: PdfValidationResult - A PdfValidationResult describing the outcome: whether the document conforms, the conformance level it was validated against, and a detailed report. When the property is set to Auto and the document claims no conformance in its metadata, no validation is performed and the result reports the document as not valid.
Properties
conformance
@propertydef conformance(self) -> PdfValidationConformance
@conformance.setterdef conformance(self, value: PdfValidationConformance) -> NoneThe conformance level the document is validated against.
Type: PdfValidationConformance