IronPDF supports export of PDFs to the PDF/A-3b standard. PDF/A-3B is a strict subset of the ISO PDF specification used to create archival versions of documents with the intent that they will always render exactly the same as when they were saved.
Section 508 Compliance
IronPDF is happy to follow Google's initiative to increase PDF archiving and accessibility and the Section 508 Compliance of PDF documents.
In 2021, we moved to rendering PDFs from HTML using the Google Chromium HTML rendering engine. This allows our software to inherit the accessibility work Google has already implemented:
Get started with IronPDF
Start using IronPDF in your project today with a free trial.
How to Convert PDF to PDF/A in C#

- Download C# Library for Creating PDF/A Documents
- Load existing or create a PDF from file, HTML, or URL
- Export a PDF/A Document from an Existing PDF File
- Export a PDF/A Document from an HTML Design or URL
- Save the PDF/A compliant document to the desired location
PDF/A Versions
The two conformance levels that IronPDF supports are A and B. 'A' represents 'accessible,' and 'B' represents 'basic.' These levels are available across PDF/A-1, PDF/A-2, and PDF/A-3 standards. The information below has been taken from Adobe's documentation on PDF/A.
- Level A conformance meets all requirements in its specification, allowing assistive software to improve accessibility for physically impaired users.
- Level B has a lower level of conformance, with minimal compliance, focusing on preserving the visual appearance of the file long-term.
PDF/A-1: The PDF/A format is based on the original PDF 1.4 version.
PDF/A-2: Released in July 2011 as a new standard called ISO 32001-1, this standard includes all features of PDF versions up to 1.7 as well as new features. Its features include the support of JPEG2000 which is handy for scanned documents and specific requirements for customized XMP metadata.
PDF/A-3: This PDF/A format includes all of the requirements of Level 2. It also allows the embedding of additional file formats—like XML, CSV, and word processing formats—into PDF/A conforming documents.
Please note
From an Existing PDF File
I have an example PDF "wikipedia.pdf
," which was generated using IronPDF and saved as a PDF file.
I will load and re-save it as a PDF/A-3B compliant PDF file in this demonstration.
Input file: "wikipedia.pdf"
Code
:path=/static-assets/pdf/content-code-examples/how-to/pdfa-fromfile.cs
using IronPdf;
// This code snippet demonstrates how to open an existing PDF file and save it in the PDF/A format,
// which is an ISO-standardized version of PDF specialized for the digital preservation of electronic documents.
try
{
// Open an existing PDF file named "wikipedia.pdf" using IronPdf's PdfDocument class.
PdfDocument pdf = PdfDocument.FromFile("wikipedia.pdf");
// Save the opened PDF as a PDF/A file.
// PdfA3b is a conformance level in PDF/A that allows embedding files as attachments in the PDF.
// The result is saved as "pdf-a3-wikipedia.pdf".
pdf.SaveAsPdfA("pdf-a3-wikipedia.pdf", PdfAVersions.PdfA3b);
}
catch (FileNotFoundException ex)
{
// Handle the case where the file does not exist
Console.WriteLine("The file 'wikipedia.pdf' was not found: " + ex.Message);
}
catch (Exception ex)
{
// Handle any other exceptions that may occur
Console.WriteLine("An error occurred while processing the PDF: " + ex.Message);
}
Imports IronPdf
' This code snippet demonstrates how to open an existing PDF file and save it in the PDF/A format,
' which is an ISO-standardized version of PDF specialized for the digital preservation of electronic documents.
Try
' Open an existing PDF file named "wikipedia.pdf" using IronPdf's PdfDocument class.
Dim pdf As PdfDocument = PdfDocument.FromFile("wikipedia.pdf")
' Save the opened PDF as a PDF/A file.
' PdfA3b is a conformance level in PDF/A that allows embedding files as attachments in the PDF.
' The result is saved as "pdf-a3-wikipedia.pdf".
pdf.SaveAsPdfA("pdf-a3-wikipedia.pdf", PdfAVersions.PdfA3b)
Catch ex As FileNotFoundException
' Handle the case where the file does not exist
Console.WriteLine("The file 'wikipedia.pdf' was not found: " & ex.Message)
Catch ex As Exception
' Handle any other exceptions that may occur
Console.WriteLine("An error occurred while processing the PDF: " & ex.Message)
End Try
Output
The output file is PDF/A-3b compliant:
From an HTML Design or URL
I have an example HTML design "design.html
," which I would like to render from HTML to PDF using IronPDF and then export as a PDF/A compliant file.
I will save it as a PDF/A-3B compliant PDF file in this demonstration.
HTML Design Example
:path=/static-assets/pdf/content-code-examples/how-to/pdfa-fromhtml.cs
using IronPdf;
using System;
// Initialize a ChromePdfRenderer instance to convert HTML to PDF
var chromeRenderer = new ChromePdfRenderer();
try
{
// Read an HTML file located at "design.html" into a string variable
var htmlContent = System.IO.File.ReadAllText("design.html");
// Render the HTML content into a PdfDocument object
PdfDocument pdf = chromeRenderer.RenderHtmlAsPdf(htmlContent);
// Save the rendered PDF document in PDF/A-3b format, which ensures accessibility standards
pdf.SaveAsPdfA("design-accessible.pdf", PdfAVersions.PdfA3b);
}
catch (System.IO.FileNotFoundException e)
{
// Handle the case where the HTML file doesn't exist
Console.WriteLine("Error: The specified HTML file was not found.");
Console.WriteLine(e.Message);
}
catch (Exception e)
{
// Generic exception handling for any other unexpected errors
Console.WriteLine("An error occurred while processing the PDF document.");
Console.WriteLine(e.Message);
}
// Note: This code assumes that the "design.html" file exists in the specified directory
// relative to the executable file. Ensure that you have the necessary permissions to read
// from this location. The code uses the IronPdf library to render HTML into a PDF format
// compliant with accessibility standards (PDF/A-3b) using Chrome rendering engine.
Imports IronPdf
Imports System
' Initialize a ChromePdfRenderer instance to convert HTML to PDF
Private chromeRenderer = New ChromePdfRenderer()
Try
' Read an HTML file located at "design.html" into a string variable
Dim htmlContent = System.IO.File.ReadAllText("design.html")
' Render the HTML content into a PdfDocument object
Dim pdf As PdfDocument = chromeRenderer.RenderHtmlAsPdf(htmlContent)
' Save the rendered PDF document in PDF/A-3b format, which ensures accessibility standards
pdf.SaveAsPdfA("design-accessible.pdf", PdfAVersions.PdfA3b)
Catch e As System.IO.FileNotFoundException
' Handle the case where the HTML file doesn't exist
Console.WriteLine("Error: The specified HTML file was not found.")
Console.WriteLine(e.Message)
Catch e As Exception
' Generic exception handling for any other unexpected errors
Console.WriteLine("An error occurred while processing the PDF document.")
Console.WriteLine(e.Message)
End Try
' Note: This code assumes that the "design.html" file exists in the specified directory
' relative to the executable file. Ensure that you have the necessary permissions to read
' from this location. The code uses the IronPdf library to render HTML into a PDF format
' compliant with accessibility standards (PDF/A-3b) using Chrome rendering engine.
The output file is PDF/A-3B compliant:
URL Example
I have the following website "https://www.microsoft.com
," which I would like to render from URL to PDF using IronPDF and then export as a PDF/A compliant file.
I will save it as a PDF/A-3B compliant PDF file in this demonstration.
:path=/static-assets/pdf/content-code-examples/how-to/pdfa-fromurl.cs
using IronPdf;
// Initialize the Chrome Renderer to create PDF documents from HTML content, URLs, and other sources using the Chromium engine.
var chromeRenderer = new ChromePdfRenderer();
// Render a specific website as a PdfDocument object using the Chrome renderer.
// The URL provided is the webpage that will be rendered into a PDF document.
PdfDocument pdf = chromeRenderer.RenderUrlAsPdf("https://www.microsoft.com");
// Save the rendered PDF document in the PDF/A format, a standardized version for long-term preservation.
// The specific PDF/A version used here is PDF/A-3b, which suits archival needs while maintaining accessibility of the digital content.
pdf.SaveAsPdfA("website-accessible.pdf", PdfDocument.PdfAType.PdfA_3b);
Imports IronPdf
' Initialize the Chrome Renderer to create PDF documents from HTML content, URLs, and other sources using the Chromium engine.
Private chromeRenderer = New ChromePdfRenderer()
' Render a specific website as a PdfDocument object using the Chrome renderer.
' The URL provided is the webpage that will be rendered into a PDF document.
Private pdf As PdfDocument = chromeRenderer.RenderUrlAsPdf("https://www.microsoft.com")
' Save the rendered PDF document in the PDF/A format, a standardized version for long-term preservation.
' The specific PDF/A version used here is PDF/A-3b, which suits archival needs while maintaining accessibility of the digital content.
pdf.SaveAsPdfA("website-accessible.pdf", PdfDocument.PdfAType.PdfA_3b)
The output file is PDF/A-3B compliant:
Support Embedding Attachment
IronPdf provides the ability to embed files into a PDF document while converting it to PDF/A format. This can be achieved using various input types such as file paths, byte arrays, or streams.
Embed with File Paths
Allows embedding of files using their file paths. A collection of file paths is provided, and these files are included as attachments during the PDF/A conversion.
:path=/static-assets/pdf/content-code-examples/how-to/pdfa-attachment-path.cs
using IronPdf;
using System.Collections.Generic;
// Create a new PdfDocument instance from an existing PDF file.
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize a collection of file paths to be embedded in the PDF/A-3B document.
// These files could be anything, such as XML documents or image files.
IEnumerable<string> embedPaths = new List<string> { "File1.xml", "File2.png" };
// Convert the current PDF document to the PDF/A-3B standard.
// The PDF/A-3B standard is used for long-term preservation of electronic documents.
// The embedded files will be included in the PDF during the conversion process.
pdf.ConvertToPdfA(embedPaths);
/*
* The code above utilizes the IronPdf library to manipulate PDF files.
* It begins by loading an existing PDF file named "Google.pdf".
* Subsequently, it defines a list of strings, which are the paths to files
* that will be embedded into the PDF document.
* The ConvertToPdfA function is used to convert the current PDF to the PDF/A-3B
* archival format, embedding the specified files in the process.
* PDF/A-3B is a version of the PDF format that is specifically designed for long-term
* digital preservation of electronic documents.
*/
Imports IronPdf
Imports System.Collections.Generic
' Create a new PdfDocument instance from an existing PDF file.
Private pdf As New PdfDocument("Google.pdf")
' Initialize a collection of file paths to be embedded in the PDF/A-3B document.
' These files could be anything, such as XML documents or image files.
Private embedPaths As IEnumerable(Of String) = New List(Of String) From {"File1.xml", "File2.png"}
' Convert the current PDF document to the PDF/A-3B standard.
' The PDF/A-3B standard is used for long-term preservation of electronic documents.
' The embedded files will be included in the PDF during the conversion process.
pdf.ConvertToPdfA(embedPaths)
'
' * The code above utilizes the IronPdf library to manipulate PDF files.
' * It begins by loading an existing PDF file named "Google.pdf".
' * Subsequently, it defines a list of strings, which are the paths to files
' * that will be embedded into the PDF document.
' * The ConvertToPdfA function is used to convert the current PDF to the PDF/A-3B
' * archival format, embedding the specified files in the process.
' * PDF/A-3B is a version of the PDF format that is specifically designed for long-term
' * digital preservation of electronic documents.
'
Embed with Byte Arrays
Enables embedding of files by providing the file content as byte arrays along with their respective file types. This is useful when files are already loaded into memory.
:path=/static-assets/pdf/content-code-examples/how-to/pdfa-attachment-byte.cs
using IronPdf;
using System.Collections.Generic;
using System.IO;
// Load the existing PDF document from the file.
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize byte arrays for the files to be embedded.
byte[] fileData1 = File.ReadAllBytes("File1.png");
byte[] fileData2 = File.ReadAllBytes("File2.xml");
// Configure the parameters for embedding the first file.
// Ensure the EmbedFileType matches the type of file being embedded.
var embedFileConfig1 = new EmbedFileConfiguration(EmbedFileType.png)
{
EmbedFileName = "logo.png"
};
// Configure the parameters for embedding the second file.
// This configuration includes advanced settings like the conformance level
// and schema details for XML files required by some standards.
var embedFileConfig2 = new EmbedFileConfiguration(EmbedFileType.xml)
{
EmbedFileName = "supportSystem.xml",
AFDesc = "Internal system",
ConformanceLevel = ConformanceLevel.XRECHNUNG,
SchemaNamespace = SchemaNamespace.Zugferd1,
SchemaPrefix = SchemaPrefix.rsm,
PropertyVersion = PropertyVersion.v1p0,
AFRelationship = AFRelationship.Supplement
};
// Create an IEnumerable of EmbedFileByte including both files to be embedded.
IEnumerable<EmbedFileByte> embedBytes = new[]
{
new EmbedFileByte(fileData1, embedFileConfig1),
new EmbedFileByte(fileData2, embedFileConfig2)
};
// Convert the PDF to conform to the PDF/A-3B standard, embedding the
// specified files, and save the resulting PDF to a file.
pdf.ConvertToPdfA(embedBytes).SaveAs("PdfACompliance.pdf");
Imports IronPdf
Imports System.Collections.Generic
Imports System.IO
' Load the existing PDF document from the file.
Private pdf As New PdfDocument("Google.pdf")
' Initialize byte arrays for the files to be embedded.
Private fileData1() As Byte = File.ReadAllBytes("File1.png")
Private fileData2() As Byte = File.ReadAllBytes("File2.xml")
' Configure the parameters for embedding the first file.
' Ensure the EmbedFileType matches the type of file being embedded.
Private embedFileConfig1 = New EmbedFileConfiguration(EmbedFileType.png) With {.EmbedFileName = "logo.png"}
' Configure the parameters for embedding the second file.
' This configuration includes advanced settings like the conformance level
' and schema details for XML files required by some standards.
Private embedFileConfig2 = New EmbedFileConfiguration(EmbedFileType.xml) With {
.EmbedFileName = "supportSystem.xml",
.AFDesc = "Internal system",
.ConformanceLevel = ConformanceLevel.XRECHNUNG,
.SchemaNamespace = SchemaNamespace.Zugferd1,
.SchemaPrefix = SchemaPrefix.rsm,
.PropertyVersion = PropertyVersion.v1p0,
.AFRelationship = AFRelationship.Supplement
}
' Create an IEnumerable of EmbedFileByte including both files to be embedded.
Private embedBytes As IEnumerable(Of EmbedFileByte) = {
New EmbedFileByte(fileData1, embedFileConfig1),
New EmbedFileByte(fileData2, embedFileConfig2)
}
' Convert the PDF to conform to the PDF/A-3B standard, embedding the
' specified files, and save the resulting PDF to a file.
pdf.ConvertToPdfA(embedBytes).SaveAs("PdfACompliance.pdf")
Embed with Streams
Provides the capability to embed files using streams for their content, along with their file types. This method is ideal for scenarios where file data is processed as a stream.
:path=/static-assets/pdf/content-code-examples/how-to/pdfa-attachment-stream.cs
using IronPdf;
using System.Collections.Generic;
using System.IO;
// Load an existing PDF document. This assumes "Google.pdf" is the path to the PDF document.
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize and configure streams for files to be embedded in the PDF document
// Embed a PNG file:
// Read the PNG file into a MemoryStream to prepare for embedding.
Stream stream1 = new MemoryStream(File.ReadAllBytes("File1.png"));
var embedFileConfig1 = new EmbedFileConfiguration(EmbedFileType.png)
{
EmbedFileName = "logo.png" // Set the name for the embedded PNG file within the PDF.
};
// Embed an XML file:
// Read the XML file into a MemoryStream to prepare for embedding.
Stream stream2 = new MemoryStream(File.ReadAllBytes("File2.xml"));
var embedFileConfig2 = new EmbedFileConfiguration(EmbedFileType.xml)
{
EmbedFileName = "supportSystem.xml", // Set the name for the embedded XML file within the PDF.
AFDesc = "Internal system", // Description of the embedded file's role.
ConformanceLevel = ConformanceLevel.XRECHNUNG, // Conformance level setting to specify compliance formatting.
SchemaNamespace = SchemaNamespace.Zugferd1, // Define the structured data format used.
SchemaPrefix = SchemaPrefix.rsm, // Schema prefix used in the XML.
PropertyVersion = PropertyVersion.v1p0, // Version of the property.
AFRelationship = AFRelationship.Supplement // Relationship of the associated file (e.g., supplementary).
};
// Create a collection of stream configurations for embedding
IEnumerable<EmbedFileStream> embedStreams = new[]
{
new EmbedFileStream(stream1, embedFileConfig1),
new EmbedFileStream(stream2, embedFileConfig2)
};
// Convert the PDF to PDF/A-3B format while embedding the configured files and save the result
pdf.ConvertToPdfA(embedStreams).SaveAs("PdfACompliance.pdf");
Imports IronPdf
Imports System.Collections.Generic
Imports System.IO
' Load an existing PDF document. This assumes "Google.pdf" is the path to the PDF document.
Private pdf As New PdfDocument("Google.pdf")
' Initialize and configure streams for files to be embedded in the PDF document
' Embed a PNG file:
' Read the PNG file into a MemoryStream to prepare for embedding.
Private stream1 As Stream = New MemoryStream(File.ReadAllBytes("File1.png"))
Private embedFileConfig1 = New EmbedFileConfiguration(EmbedFileType.png) With {.EmbedFileName = "logo.png"}
' Embed an XML file:
' Read the XML file into a MemoryStream to prepare for embedding.
Private stream2 As Stream = New MemoryStream(File.ReadAllBytes("File2.xml"))
Private embedFileConfig2 = New EmbedFileConfiguration(EmbedFileType.xml) With {
.EmbedFileName = "supportSystem.xml",
.AFDesc = "Internal system",
.ConformanceLevel = ConformanceLevel.XRECHNUNG,
.SchemaNamespace = SchemaNamespace.Zugferd1,
.SchemaPrefix = SchemaPrefix.rsm,
.PropertyVersion = PropertyVersion.v1p0,
.AFRelationship = AFRelationship.Supplement
}
' Create a collection of stream configurations for embedding
Private embedStreams As IEnumerable(Of EmbedFileStream) = {
New EmbedFileStream(stream1, embedFileConfig1),
New EmbedFileStream(stream2, embedFileConfig2)
}
' Convert the PDF to PDF/A-3B format while embedding the configured files and save the result
pdf.ConvertToPdfA(embedStreams).SaveAs("PdfACompliance.pdf")
Explore the EmbedFileConfiguration
When converting a PdfDocument to a PDF/A-3 format that includes embedded files, it’s important to configure parameters such as EmbedFilePath, EmbedFileByte, or EmbedFileStream. These settings let you specify the type of file being embedded, its name, and any custom XMP metadata you wish to include.
Proper configuration ensures that the embedded content is organized effectively and complies with PDF/A-3 standards. Customizing the XMP metadata allows for additional information about the embedded files, enhancing the overall usability and accessibility of the document. Using the EmbedFileConfiguration
class developers can easily customize the values and formats for the file.
var config = new EmbedFileConfiguration
{
EmbedFileName = "Attachment.xml",
AFDesc = "Associated File Description",
ConformanceLevel = ConformanceLevel.EN16931,
SchemaNamespace = SchemaNamespace.facturX,
SchemaPrefix = SchemaPrefix.fx,
PropertyVersion = PropertyVersion.v1,
AFRelationship = AFRelationship.Alternative
};
// Load a PDF document
var document = PdfDocument.FromFile("wikipedia.pdf");
// Configure embedded file parameters
document.EmbedFileFromFilePath("path/to/attachment", config);
// Save the document as PDF/A-3b
document.SaveAsPdfA3B("output-with-configured-attachment.pdf");
var config = new EmbedFileConfiguration
{
EmbedFileName = "Attachment.xml",
AFDesc = "Associated File Description",
ConformanceLevel = ConformanceLevel.EN16931,
SchemaNamespace = SchemaNamespace.facturX,
SchemaPrefix = SchemaPrefix.fx,
PropertyVersion = PropertyVersion.v1,
AFRelationship = AFRelationship.Alternative
};
// Load a PDF document
var document = PdfDocument.FromFile("wikipedia.pdf");
// Configure embedded file parameters
document.EmbedFileFromFilePath("path/to/attachment", config);
// Save the document as PDF/A-3b
document.SaveAsPdfA3B("output-with-configured-attachment.pdf");
Dim config = New EmbedFileConfiguration With {
.EmbedFileName = "Attachment.xml",
.AFDesc = "Associated File Description",
.ConformanceLevel = ConformanceLevel.EN16931,
.SchemaNamespace = SchemaNamespace.facturX,
.SchemaPrefix = SchemaPrefix.fx,
.PropertyVersion = PropertyVersion.v1,
.AFRelationship = AFRelationship.Alternative
}
' Load a PDF document
Dim document = PdfDocument.FromFile("wikipedia.pdf")
' Configure embedded file parameters
document.EmbedFileFromFilePath("path/to/attachment", config)
' Save the document as PDF/A-3b
document.SaveAsPdfA3B("output-with-configured-attachment.pdf")
EmbedFileName
: Astring
property representing the name of the embedded file in the PDF/A document. By default, this string is empty.AFDesc
: Astring
property representing the associated file description for the embedded file. By default, this string is empty.ConformanceLevel
: The conformance level of embedding XML files applying to XMP Metadata of PDF/A document. Default isConformanceLevel.EN16931
. IronPDF provides different values via theConformanceLevel
enum.SchemaNamespace
: The PDF/A Schema NamespaceURI embedding the XML file and applying it to the XMP metadata of the PDF/A document. Default isSchemaNamespace.facturX
, with various options available for developers in theSchemaNamespace
enum.SchemaPrefix
: The PDF/A Schema Prefix for embedding an XML file applying to the XMP Metadata of a PDF/A document. Default isSchemaPrefix.fx
, with several options available in theSchemaPrefix
enum.PropertyVersion
: The property version of the embedding XML file applied to XMP Metadata of PDF/A document. Default isPropertyVersion.v1
, with multiple options in thePropertyVersion
enum.AFRelationship
: The relation of the associated file (embedded file) to the PDF/A document. Several options are available in theAFRelationship
enum.
Frequently Asked Questions
What is PDF/A-3B format?
PDF/A-3B is a strict subset of the ISO PDF specification used to create archival versions of documents that will always render exactly the same as when they were saved.
How can I convert a PDF to PDF/A-3B using IronPDF?
You can convert a PDF to PDF/A-3B using IronPDF by loading the existing PDF document using PdfDocument.FromFile() and then saving it as PDF/A-3B with the SaveAsPdfA3B() method.
What are the PDF/A conformance levels supported by IronPDF?
IronPDF supports two conformance levels: 'A' for accessible and 'B' for basic conformance. These are available across PDF/A-1, PDF/A-2, and PDF/A-3 standards.
Can I convert HTML or URLs to PDF/A-3B using IronPDF?
Yes, you can convert HTML or URLs to PDF/A-3B using IronPDF by rendering HTML or URLs to PDF and then saving the document as PDF/A-3B.
Does IronPDF support embedding attachments in PDF/A-3B documents?
Yes, IronPDF supports embedding attachments in PDF/A-3B documents using file paths, byte arrays, or streams.
What is the purpose of the EmbedFileConfiguration in IronPDF?
EmbedFileConfiguration allows you to configure parameters for embedded files, such as file name, description, conformance level, and metadata, ensuring compliance with PDF/A-3 standards.
What are the benefits of using IronPDF for PDF/A conversion?
IronPDF provides long-term document preservation and compliance with archival standards, supports various input formats, and offers the ability to embed attachments and customize metadata.
Is IronPDF compliant with Section 508 accessibility standards?
Yes, IronPDF follows Google's initiative for PDF archiving and accessibility, adhering to Section 508 compliance for PDF documents.
How does IronPDF handle accessibility for PDF/A documents?
IronPDF uses the Google Chromium HTML rendering engine, inheriting accessibility features implemented by Google to improve accessibility for PDF/A documents.
Can IronPDF convert PDFs with attachments to PDF/A-3B?
Currently, IronPDF does not support converting PDFs with attachment files directly to PDF/A-3B.