IRONSOFTWAREHOME

How to Export PDF/UA Format Documents in IronPDF C#

Curtis Chau
Curtis Chau
Updated: September 17, 2026

IronPDF exports PDFs to the PDF/UA accessibility standard in C# using the SaveAsPdfUA method on a PdfDocument, or RenderHtmlAsPdfUA to build an accessible PDF straight from HTML. The library writes both PDF/UA-1 (ISO 14289-1) and PDF/UA-2 (ISO 14289-2:2024), tagging the document so screen readers and other assistive technologies can read it.

PDF/UA defines how a PDF carries its structure: a tagged content tree, alternative text for images, a declared reading order, and a document language. Files that meet the standard satisfy the accessibility requirements set by Section 508 of the Rehabilitation Act, which is why government bodies, schools, and regulated industries rely on it.

Quickstart: Generate PDF/UA Compliant Documents

Load an existing PDF and convert it to the PDF/UA standard in one call. You can install IronPDF from NuGet to follow along.

  1. 1Install IronPDF with NuGet Package Manager

    PM > Install-Package IronPdf

  2. 2Copy and run this code snippet.

    IronPdf.PdfDocument.FromFile("input.pdf").SaveAsPdfUA("output_pdfua.pdf");
    C#
  3. 3Deploy to test on your live environment

    Start using IronPDF in your project today with a free trial
    arrow pointer
Please note: Examples produce PDF/UA-1 by default. IronPDF also writes PDF/UA-2 (ISO 14289-2:2024) using the version parameter shown below.

How Do I Export PDF/UA Documents?

Use the SaveAsPdfUA method to write a loaded PDF as a PDF/UA file. Pass the optional NaturalLanguage argument to declare the document's language, which assistive technology uses to pick the correct pronunciation. IronPDF writes PDF/UA-1 by default and PDF/UA-2 when you request it.

During export, IronPDF builds the tagged structure tree that PDF/UA requires, carries over the alternative text already attached to images, and sets the reading order from the source content. Source documents that arrive with proper headings, image alt text, and a logical layout convert cleanly. For documents that need structure added first, set the document metadata and title before you call the export.

Input

What Code Do I Need to Export PDF/UA?

The example below converts an existing PDF to PDF/UA-1, the case you hit when legacy documents need to meet accessibility rules. The conversion keeps the page content while adding the tags, language declaration, and structure the standard expects.

using IronPdf;

// Open PDF File
PdfDocument pdf = PdfDocument.FromFile("wikipedia.pdf");

// Export as PDF/UA. Pass the document's natural language so assistive
// technologies announce the correct pronunciation.
pdf.SaveAsPdfUA("pdf-ua-wikipedia.pdf", NaturalLanguage: NaturalLanguages.English);
C#

Output

The exported file passes the veraPDF Conformance Checker for PDF/UA-1:

veraPDF Conformance Checker showing successful PDF/UA-1 validation with a green compliance confirmation message

How Do I Add Alt Text to Images in an Existing PDF?

SetImageAltText describes an image that is already in the document, which covers the case where the source is a PDF and there is no HTML alt attribute for export to carry over. Pass a zero-based page index, a zero-based image index and the description, and IronPDF tags that image with a Figure structure element holding the text.

using IronPdf;

// Open PDF File
PdfDocument pdf = PdfDocument.FromFile("report.pdf");

// Get page images to find the index to describe
var images = pdf.ExtractImagesFromPage(0);

// Set alt text by page index and image index
pdf.SetImageAltText(0, 0, "Bar chart of quarterly revenue by product line")
   .SetImageAltText(0, 1, "Company logo");

// Export as PDF/UA compliance PDF
pdf.SaveAsPdfUA("report-accessible.pdf");
C#

Image indexes use the same ordering as ExtractImagesFromPage, so enumerate a page with that method when you need to work out which index to describe. The method returns the same PdfDocument, so calls chain, and calling it again for the same page and image replaces the description in place instead of adding a second tag.

Set the alt text first, then convert. The tag exists as soon as the call returns, but ConvertToPdfUA() or SaveAsPdfUA() is what produces a compliant document, and the conversion preserves the descriptions already set.

Warning: altText cannot be null, empty or whitespace: an empty description is not valid PDF/UA and raises ArgumentException. A negative pageIndex or imageIndex raises ArgumentOutOfRangeException, and an index past the end of the document, or a PDF whose existing structure tree has an unsupported shape, is refused rather than tagged incorrectly.
Please note: This describes an image. It does not make the surrounding page text screen-readable on its own, and image-only or scanned PDFs still need OCR for their text. For fully tagged output from source content, RenderHtmlAsPdfUA remains the recommended path.

What's the Difference Between PDF/UA-1 and PDF/UA-2?

PDF/UA-1 (ISO 14289-1) is the original universal accessibility standard for PDF, released in 2012. It sets the baseline for accessible files: tagged content, support for assistive technology, and a defined reading order.

PDF/UA-2 (ISO 14289-2:2024) is the current version. It adds handling for modern PDF features such as form fields, annotations, multimedia, and nested document structures, and aligns with the PDF 2.0 specification while keeping the accessibility guarantees of the earlier version.

Please note: PDF/UA-2 is written on top of PDF 2.0 via QPDF for its newer feature set and format compatibility.

To target PDF/UA-2, pass the version to the SaveAsPdfUA method:

using IronPdf;

// Load existing PDF
var pdf = PdfDocument.FromFile("input.pdf");

// Export as PDF/UA-2 format
pdf.SaveAsPdfUA("output_pdfua2.pdf", PdfUAVersions.PdfUA2);
C#

How Do I Convert to PDF/UA-2 In Memory?

When you need to apply more changes before writing the file, call ConvertToPdfUA() to transform the document in memory, then run the rest of your operations and save at the end:

using IronPdf;

// Open PDF File
PdfDocument pdf = PdfDocument.FromFile("input.pdf");

// Convert to PDF/UA-2 in memory
pdf.ConvertToPdfUA(PdfUAVersions.PdfUA2);

// Perform additional modifications if needed
// ...

// Save the converted document
pdf.SaveAs("output-ua2.pdf");
Please note: ConvertToPdfUA() runs before SaveAs(). SaveAsPdfUA() performs the conversion for you in a single call.

My favorite library of this kind is IronPDF. It allows for fast and efficient manipulation of PDF files. It also has many valuable features, like exporting to PDF/A format and digitally signing PDF documents.

Milan Jovanovic

Microsoft MVP

View case study

IronOCR means we can save $40,000 annually from manual processing, while enhancing productivity and freeing up resources for high-impact tasks. I would highly recommend it.

Brent Matzelle

Chief Technology Officer, OPYN

View case study

How Do I Render HTML Directly to PDF/UA?

Call RenderHtmlAsPdfUA to turn HTML into a PDF/UA document in one step, which suits new documents and dynamic content coming out of a web application. The method takes a NaturalLanguages value so the output carries the correct language tag.

Write the HTML with accessibility in mind: use semantic elements, keep a clean heading hierarchy, add alt text to every image, and let the content flow in reading order. PDF/UA also requires a document title, so set MetaData.Title before saving. The same approach drives our wider guide to creating Section 508 compliant PDFs.

What Code Renders HTML to PDF/UA?

This example builds a PDF/UA file from semantic HTML. The headings and paragraphs map to structure tags, and the metadata title gives the document the identification PDF/UA requires.

using IronPdf;

ChromePdfRenderer renderer = new ChromePdfRenderer();

// Render semantic HTML straight to PDF/UA. Pass the natural language so
// screen readers announce the correct pronunciation.
var pdf = renderer.RenderHtmlAsPdfUA(@"
    <!DOCTYPE html>
    <html lang=""en"">
    <head>
        <title>Document</title>
    </head>
    <body>
        <h1>Heading 1</h1>
        <h2>Heading 2</h2>
        <p>Paragraph text</p>
    </body>
    </html>", NaturalLanguages.English);

// PDF/UA requires a document Title in the metadata
pdf.MetaData.Title = "Accessible Report";

pdf.SaveAs("html-string-ua-ironpdf.pdf");
C#

Output

How Do I Verify PDF/UA Compliance?

Validate the output with the veraPDF Conformance Checker, a free open-source tool that tests against both PDF/UA-1 and PDF/UA-2 and reports any structural gap. Run it after each export while you are building an accessibility workflow, since a missing title or untagged image is easier to catch at validation time than in production.


What Are the Benefits of PDF/UA?

PDF/UA compliance pays off beyond satisfying a regulation:

  1. Accessibility: Screen readers and assistive technology read the tagged structure correctly for users with visual impairments.
  2. Mobile reading: Text reflow keeps documents readable on small screens without horizontal scrolling.
  3. Searchability: A defined structure improves indexing and in-document search.
  4. Longevity: Tagged documents keep their accessibility features across platforms and software updates.
  5. Legal compliance: The format meets Section 508 and similar government requirements for accessible documents.

For teams building interactive documents, pairing PDF/UA export with accessible PDF forms gives every field a label that assistive technology can announce.

How Can I Integrate PDF/UA Into My Workflow?

Start by getting structure into the source. When a legacy file lacks it, add metadata and a document title before conversion so the export has the language and identification PDF/UA needs.

For high-volume pipelines, run PDF/UA export alongside other IronPDF operations such as merging or splitting PDFs to assemble accessible documents at scale. The standard composes with these steps, so a merged report can stay PDF/UA compliant end to end. IronPDF produces the same tagged output across Windows, Linux, and Azure, so the compliance you validate locally holds wherever you deploy.

Conclusion

You now have three routes to an accessible PDF in IronPDF: convert an existing file with SaveAsPdfUA, transform it in memory with ConvertToPdfUA, or render HTML straight to the standard with RenderHtmlAsPdfUA, each able to write PDF/UA-1 or PDF/UA-2 with a declared language and document title. From here, carry the same accessibility approach into Section 508 compliant PDFs across the rest of your document workflow.

Frequently Asked Questions

How can I export a PDF as a PDF/UA document using IronPDF?

You can export a PDF as a PDF/UA document using IronPDF by employing the `SaveAsPdfUA` method on a `PdfDocument` object. This method supports both PDF/UA-1 and PDF/UA-2 standards, ensuring compliance with accessibility requirements like those in Section 508.

What method should I use to convert HTML to a PDF/UA document in IronPDF?

Use the `RenderHtmlAsPdfUA` method in IronPDF to convert HTML directly to a PDF/UA document. This method is ideal for creating accessible documents from HTML content while ensuring proper tagging and language specification.

What is the difference between PDF/UA-1 and PDF/UA-2?

PDF/UA-1 (ISO 14289-1) is the original standard released in 2012 for universal accessibility, while PDF/UA-2 (ISO 14289-2:2024) accommodates modern PDF features like form fields and annotations, aligning with PDF 2.0 for enhanced accessibility.

How do I specify the document's language when exporting to PDF/UA using IronPDF?

When exporting a document to PDF/UA with IronPDF, use the `NaturalLanguage` argument in the `SaveAsPdfUA` method to specify the document's language, ensuring accurate pronunciation by assistive technologies.

Can I convert a PDF to PDF/UA format in memory using IronPDF?

Yes, you can use the `ConvertToPdfUA()` method to convert a PDF to PDF/UA format in memory with IronPDF. This allows for further modifications before saving the final document.

How do I validate a PDF/UA document for compliance?

You can validate a PDF/UA document for compliance with accessibility standards using the free and open-source veraPDF Conformance Checker, which checks for structural gaps and confirms compliance with PDF/UA-1 and PDF/UA-2.

What are the benefits of producing PDF/UA compliant documents?

PDF/UA compliant documents offer enhanced accessibility for users with visual impairments, improved mobile reading, better searchability, legal compliance (such as Section 508), and longevity across platforms and software updates.

How can I ensure that a PDF document's headings and structure convert correctly to PDF/UA?

To ensure correct conversion to PDF/UA, prepare the source document with appropriate headings, image alt text, and a logical layout. Make sure the document is structured well before conversion in IronPDF.

What steps are involved in creating a PDF/UA compliant document with IronPDF?

To create a PDF/UA compliant document with IronPDF: 1) Download the library, 2) Import an existing PDF, 3) Edit as needed, 4) Export using `SaveAsPdfUA`, and 5) Validate compliance using the veraPDF Checker.

Can IronPDF handle large-scale PDF/UA document production?

Yes, IronPDF facilitates large-scale PDF/UA document production by integrating with operations like merging and splitting PDFs. This allows for high-volume and compliant document assembly within enterprise workflows.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 21,228,841Version:2026.9just released

Get your FREE

30-day Trial Key instantly.

bullet_checkedNo credit card or account creation required
bullet_testTest in production
without watermarks
bullet_calendar30 days fully
functional product
bullet_support24/5 technical
support during trial
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999