---
title: "Validate PDF/UA conformance | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/pdfua/validate-pdf-ua/"
md_url: "https://www.nutrient.io/guides/dotnet/pdfua/validate-pdf-ua.md"
last_updated: "2026-07-17T00:00:00.000Z"
description: "Validate PDF/UA-1 compliance and generate an XML validation report using Nutrient .NET SDK."
---

# Validate PDF/UA conformance

PDF/UA validation checks whether a PDF meets the accessibility requirements of ISO 14289-1. Use this workflow after generating accessible PDFs or before accepting uploaded documents into an accessibility compliance process.

Nutrient.NET SDK validates PDF/UA-1 documents in process. The validator returns a Boolean result and an XML report that describes validation details.

[Download sample](https://www.nutrient.io/downloads/samples/gdpicture/validate-pdf-ua.zip)

## Preparing the project

Register the SDK license before running validation operations. PDF/UA validation requires a license with the PDF/UA validation feature. For setup details, refer to the [getting started with.NET SDK](https://www.nutrient.io/sdk/dotnet/getting-started.md) guide.

```csharp

using System;
using System.IO;
using GdPicture14;

LicenseManager license = new LicenseManager();
license.RegisterKEY(""); // Set your license key

```

## Loading the PDF document

Create a `GdPicturePDF` instance and load the source file:

```csharp

using GdPicturePDF pdf = new GdPicturePDF();
GdPictureStatus status = pdf.LoadFromFile(@"input.pdf", false);

if (status!= GdPictureStatus.OK)
{
    throw new InvalidOperationException($"The PDF couldn't be loaded. Status: {status}");
}

```

The second argument controls whether the document is loaded into memory (`LoadInMemory`). Set it to `true` to load in memory (required if you plan to overwrite the source file), or `false` to read it from disk.

## Validating PDF/UA conformance

Run PDF/UA-1 validation and write the detailed XML report to a file:

```csharp

string validationReport = "";
bool isValid = pdf.CheckPDFUAConformance(PdfValidationConformance.PDF_UA_1, ref validationReport);
GdPictureStatus validationStatus = pdf.GetStat();

if (validationStatus!= GdPictureStatus.OK)
{
    throw new InvalidOperationException($"PDF/UA validation failed. Status: {validationStatus}");
}

File.WriteAllText(@"validation-report.xml", validationReport);
Console.WriteLine(isValid? "The document is PDF/UA-1 compliant." : "The document isn't PDF/UA-1 compliant.");

```

`CheckPDFUAConformance` validates the document against the requested conformance level. The Boolean result reports whether the document passed validation. The XML report provides details for audit, troubleshooting, or human review workflows.

For a basic pass-or-fail check, use `IsValidPDFUA`. It validates PDF/UA conformance and also supports returning the XML report:

```csharp

string quickValidationReport = "";
bool quickResult = pdf.IsValidPDFUA(ref quickValidationReport);

```

## Checking declared PDF conformance

To read the conformance declared by the loaded PDF, use `GetPDFConformance`:

```csharp

PdfConformance declaredConformance = pdf.GetPDFConformance();
Console.WriteLine($"Declared conformance: {declaredConformance}");

```

`GetPDFConformance` replaces `GetPDFAConformance`. `GetPDFAConformance` is retained for backward compatibility. Use `GetPDFConformance` for new code because it reports both PDF/A and PDF/UA conformance.

## Handling validation results

In production, use the validation result to route the document:

- Accept the document when `isValid` is `true`.

- Store the XML report with the document for audit trails.

- Send failed documents to a remediation workflow.

- Log `GdPictureStatus` values when loading or validation fails.

## Conclusion

This workflow validates a PDF against PDF/UA-1, writes a detailed XML report, and reads the PDF conformance declared by the document.

For PDF/UA generation, refer to the [PDF to PDF/UA](https://www.nutrient.io/guides/dotnet/conversion/pdf-to-pdf-ua.md) guide.
---

## Related pages

- [PDF/UA accessibility compliance](/guides/dotnet/pdfua.md)

