---
title: "PdfValidator"
canonical_url: "https://www.nutrient.io/api/csharp/validation/pdf-validator/"
md_url: "https://www.nutrient.io/api/csharp/validation/pdf-validator.md"
last_updated: "2026-10-08T08:55:57.713Z"
description: "Validates PDF documents against archival (PDF/A) and accessibility (PDF/UA) conformance standards."
---

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.

```csharp

using Nutrient;

```

The SDK creates this class through factory methods or other SDK objects.

## Properties

### Conformance

```csharp

public PdfValidationConformance Conformance { get; set; }

```

The conformance level the document is validated against.

**Type:** [`PdfValidationConformance`](/api/csharp/enums/pdf-validation-conformance/)

## Methods

### Set

```csharp

public static PdfValidator Set(Document document)

```

Creates a PdfValidator instance for the specified document.

**Parameters**

| Name       | Type                                | Description                   |
| ---------- | ----------------------------------- | ----------------------------- |
| `document` | [`Document`](/api/csharp/document/) | The PDF document to validate. |

**Returns:** [`PdfValidator`](/api/csharp/validation/pdf-validator/) - A PdfValidator instance ready to validate the document.

### Validate

```csharp

public PdfValidationResult Validate()

```

Validates the document against the conformance level specified by the `Conformance` property.

**Returns:** [`PdfValidationResult`](/api/csharp/validation/pdf-validation-result/) - 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.

## Resource management

```csharp

public void Dispose()

```

`PdfValidator` implements `IDisposable` and owns native resources. Always call `Dispose()` or use a C# `using` declaration: it is not released automatically.

---

## Related pages

- [Validation](/api/csharp/validation.md)
- [Pdf Validation Result](/api/csharp/validation/pdf-validation-result.md)

