Convert PDF to PDF/UA
This sample demonstrates how to convert a standard PDF document to PDF/UA (Universal Accessibility) format using the Nutrient Native SDK. PDF/UA is an ISO standard that ensures PDF documents are accessible to users with disabilities, making content available to assistive technologies such as screen readers and other accessibility tools.
SDK Advantages
The Nutrient Native SDK provides comprehensive PDF/UA conversion capabilities with several key benefits:
- Accessibility compliance: Generates PDF/UA documents that meet ISO 14289-1 accessibility standards
- Assistive technology support: Ensures compatibility with screen readers, magnifiers, and other accessibility tools
- Structured content: Creates properly tagged document structure for navigation and content interpretation
- Standards validation: Built-in verification ensures output meets PDF/UA specifications
- Legal compliance: Helps organizations meet accessibility requirements under various disability rights laws
Project Setup
This sample requires the core Nutrient Native SDK package plus the GdPicture.Resources package for PDF/UA conversion functionality.
Preparing the project
The first step involves initializing the SDK by registering the license. This needs to be done only once during the application’s lifetime and must occur before executing any conversion operations (see Getting Started with .NET SDK(opens in a new tab) for more details.)
using GdPicture14;
LicenseManager licence = new LicenseManager();licence.RegisterKEY(""); // Set your license keyThe LicenseManager class handles SDK authentication and enables access to the advanced PDF/UA conversion functionality. Proper license registration ensures that the PDF processor can access the full range of accessibility conversion capabilities, including document structure analysis, tag generation, and compliance validation required for professional accessibility workflows.
Loading the PDF document
The conversion process begins by creating a PDF document instance and loading the source file that requires transformation to accessible format.
using GdPicturePDF pdf = new GdPicturePDF();pdf.LoadFromFile(@"input.pdf");The GdPicturePDF class provides comprehensive PDF manipulation capabilities with automatic resource management through the using statement. The LoadFromFile method performs critical operations including document validation and structure analysis, content extraction for accessibility tagging, font and image inventory for compliance checking, and preparation of the document for accessibility enhancement while preserving all original visual and structural elements.
Converting to PDF/UA format
The core conversion operation transforms the loaded PDF into a fully accessible PDF/UA document that meets international accessibility standards.
pdf.ConvertToPDFUA(@"output.pdf", PdfConversionConformance.PDF_UA_1);The ConvertToPDFUA method executes a comprehensive accessibility enhancement process that analyzes document structure and creates appropriate tags, ensures proper reading order for screen readers, adds alternative text for images and graphics, validates color contrast and text accessibility, and generates a PDF/UA-compliant document that enables full accessibility technology support.
The conversion process automatically handles document structure tagging, heading hierarchy establishment, table accessibility markup, form field accessibility enhancement, and navigation structure creation, ensuring that the resulting PDF/UA document provides complete accessibility for users with disabilities while maintaining full visual and functional integrity.
The conversion process is complete, delivering a fully accessible PDF/UA document that complies with international accessibility standards and enables universal access for users with disabilities.
PDF/UA Requirements
The PDF/UA conversion automatically implements several accessibility requirements:
- Document Structure: Creates a logical document structure with proper heading hierarchy
- Tagged Content: Tags all content elements for assistive technology interpretation
- Alternative Text: Ensures images and non-text elements have appropriate descriptions
- Color Contrast: Validates color usage meets accessibility guidelines
- Font Embedding: Embeds all fonts to ensure consistent text rendering
- Reading Order: Establishes a logical reading sequence for document navigation
Accessibility Features
PDF/UA documents provide enhanced accessibility through:
- Screen Reader Support: Structured content enables accurate text-to-speech conversion
- Keyboard Navigation: Proper tab order and navigation structure for users who cannot use a mouse
- Zoom Compatibility: Text and layout scale appropriately for users with visual impairments
- Language Identification: Proper language tagging for multilingual content
- Form Accessibility: Interactive elements are properly labeled and accessible
Error Handling
The sample includes basic output validation to ensure conversion completed successfully. In production applications, consider implementing additional error handling:
- Validate input file existence and format before conversion
- Check PDF status after loading and conversion operations
- Handle potential exceptions during file I/O operations
- Verify PDF/UA compliance using accessibility validation tools
- Test output with actual assistive technologies
Compliance and Legal Considerations
PDF/UA compliance is important for various legal and regulatory requirements:
- ADA Compliance: Americans with Disabilities Act requirements for digital accessibility
- Section 508: US federal accessibility standards for electronic documents
- WCAG Guidelines: Web Content Accessibility Guidelines for document accessibility
- EN 301 549: European accessibility standard for digital content
- International Standards: ISO 14289-1 PDF/UA standard compliance
Testing PDF/UA Documents
After conversion, verify accessibility using:
- Screen Reader Testing: Test document navigation and content reading with actual screen readers
- Accessibility Validators: Use specialized tools to verify PDF/UA compliance
- Manual Testing: Review document structure, alt text, and navigation order
- User Testing: Validate usability with actual users who rely on assistive technologies
Conclusion
This sample demonstrates the process of converting PDF documents to PDF/UA format using the Nutrient Native SDK. The PDF/UA conversion functionality ensures documents meet international accessibility standards, making digital content available to all users regardless of disabilities. This capability is essential for organizations committed to digital inclusion and legal compliance with accessibility regulations.