Back to Devexpress

How to: Export Document as Accessible PDF

officefileapi-404975-word-processing-document-api-examples-export-how-to-export-to-accessible-pdf.md

latest6.7 KB
Original Source

How to: Export Document as Accessible PDF

  • Jan 07, 2026
  • 3 minutes to read

You can save a document as a tagged (accessible) PDF document. Accessible PDF formats allow users to use screen readers and other assistive technologies to read information from PDF documents.

You can generate PDF files that conform to the following standards:

  • PDF/UA
  • PDF/A-1a
  • PDF/A-2a
  • PDF/A-3a

Run Demo: Save Word Documents as Accessible PDF Files

Generate PDF/UA Documents

The PDF/UA (Universal Accessibility) standard contains requirements for PDF documents to ensure accessibility and support for assistive technology. Requirements for PDF/UA compliance are consistent with the Web Content Accessibility Guidelines (WCAG) 2.0.

Below are some constraints the standard defines for PDF documents:

  • All meaningful content should be tagged and included in the structure tree of document tags. Objects that are not relevant for understanding document content are marked as artifacts (for example, background and decorative images, repeating information in headers and footers, page numbers). You can use the Shape.Decorative property to mark images as decorative.

  • The structure tree generated by document tags must reflect the document’s logical reading order.

  • Information should not be conveyed by visual means alone (for example, contrast, color, or position on the page).

  • All pictorial elements (image objects and other non-text objects such as vector objects or object groups) should have alternative text.

  • All fonts should be embedded.

To generate a document that conforms to the PDF/UA standard, create a PdfExportOptions class instance and set the PdfExportOptions.PdfUACompatibility property to PdfUA1. Pass options as a parameter to the RichEditDocumentServer.ExportToPdf method to save a document in PDF/UA format.

csharp
using DevExpress.XtraRichEdit;
using DevExpress.XtraPrinting;
// ...

using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
    wordProcessor.LoadDocument("Documents\\MovieRentals.docx", DocumentFormat.Docx);
    PdfExportOptions options = new PdfExportOptions();
    options.PdfUACompatibility = PdfUACompatibility.PdfUA1;
    wordProcessor.ExportToPdf(@"Documents\Output_Document.pdf", options);
}
vb
Imports DevExpress.XtraRichEdit
Imports DevExpress.XtraPrinting
' ...

Using wordProcessor As New RichEditDocumentServer()
    wordProcessor.LoadDocument("Documents\MovieRentals.docx", DocumentFormat.Docx)
    Dim options As New PdfExportOptions()
    options.PdfUACompatibility = PdfUACompatibility.PdfUA1
    wordProcessor.ExportToPdf("Documents\Output_Document.pdf", options)
End Using

Generate Accessible PDF/A Documents

PDF/A is an archival PDF format used for long-term preservation of electronic documents. The PDF/A standard includes the following restrictions:

  • All PDF/A versions implicitly prohibit encryption.
  • All fonts that are used in PDF/A documents should be embedded.
  • The PDF/A-1 and PDF/A-2 standards do not support attachments.
  • The PDF/A-1 standard does not support transparency (the alpha channel in images is ignored).

To export a document as a PDF document that supports the PDF/A Conformance Level A (Accessible), create a PdfExportOptions class instance and set the PdfExportOptions.PdfACompatibility property to one of the following values: PdfA1a, PdfA2a, or PdfA3a. Pass the class instance to the RichEditDocumentServer.ExportToPdf method to generate the PDF file.

The following code sample saves a DOCX document as a PDF file that conforms to the PDF/A-3a standard:

csharp
using DevExpress.XtraRichEdit;
using DevExpress.XtraPrinting;
// ...

using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
    wordProcessor.LoadDocument("Documents\\MovieRentals.docx", DocumentFormat.Docx);
    PdfExportOptions options = new PdfExportOptions();
    options.PdfACompatibility = PdfACompatibility.PdfA3a;
    wordProcessor.ExportToPdf(@"Documents\Output_Document.pdf", options);
}
vb
Imports DevExpress.XtraRichEdit
Imports DevExpress.XtraPrinting
' ...

Using wordProcessor As New RichEditDocumentServer()
    wordProcessor.LoadDocument("Documents\MovieRentals.docx", DocumentFormat.Docx)
    Dim options As New PdfExportOptions()
    options.PdfACompatibility = PdfACompatibility.PdfA3a
    wordProcessor.ExportToPdf("Documents\Output_Document.pdf", options)
End Using

Accessibility Standards Compliance

Our objective is to align our components with Web Content Accessibility Guidelines (WCAG) and Section 508 standards.

We use the following accessibility verification tools to test our components:

Accessibility Test ToolSupport Level
PDF Accessibility Checker 2024 Accessibility Validation
Adobe Acrobat Pro Accessibility Validation

- all checked PDF/UA and WCAG 2.1 requirements are fulfilled, all accessibility tests passed.

The exported PDFs meet the following WCAG checkpoints:

WCAG CheckpointPassed
1. Perceivable - 1.1 Text Alternatives
1. Perceivable - 1.4 Distinguishable
2. Operable - 2.4 Navigable
3. Understandable - 3.1 Readable
4. Robust - 4.1 Compatible