# How to Export PDF/A, PDF/A-3, or PDF/A-4 Format Documents in C#
<div class="alert alert-info iron-variant-1" role="alert">
Your business is spending too much on yearly subscriptions for PDF security and compliance. Consider <a href="https://ironsoftware.com/enterprise/securedoc/">IronSecureDoc</a>, which provides solutions for managing SaaS services like digital signing, redaction, encryption, and protection, all for a one-time payment. <a href="https://ironsoftware.com/enterprise/securedoc/docs/">Explore IronSecureDoc's Documentation</a>
</div>
**IronPDF supports export of PDFs to the PDF/A-3b and PDF/A-4** standards. 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. PDF/A-4 is the latest compliance standard, offering enhanced support for digital signatures.
## Section 508 Compliance
IronPDF follows Google's initiative to increase PDF archiving and accessibility for Section 508 compliance. When working with [HTML to PDF conversion](https://ironpdf.com/tutorials/html-to-pdf/), our rendering engine preserves all accessibility features.
In 2021, we moved to rendering PDFs from HTML using Google Chromium's HTML rendering engine. This allows our software to inherit [accessibility work Google has already implemented](https://blog.chromium.org/2020/07/using-chrome-to-generate-more.html).
### Why is Section 508 compliance important for PDF/A documents?
Section 508 compliance ensures PDF documents are accessible to individuals with disabilities using assistive technologies like screen readers. PDF/A documents meeting Section 508 standards guarantee content remains accessible throughout archival lifespan. This compliance is critical for government agencies, educational institutions, and organizations providing equal access to information for all users.
***
<div class="hsg-featured-snippet">
<h3>Minimal Workflow (4 steps)</h3>
<img class="featured-snippet__image featured-snippet__image--float-right featured-snippet__image--new-template"
src="/static-assets/pdf/images/How-to-Export-PDFA-Compliant-Documents.webp" alt="4-step workflow for creating PDF/A compliant
documents in C# using IronPDF library with installation command" />
<ol>
<li><a class="js-modal-open" data-modal-id="trial-license-after-download"
href="https://www.nuget.org/packages/IronPdf/">Download C# Library for Creating PDF/A Documents</a></li>
<li>Load existing PDF or render from HTML/URL</li>
<li>Select PDF/A version based on archival requirements</li>
<li>Convert and save as PDF/A compliant document</li>
</ol>
</div>
## What PDF/A Versions Does IronPDF Support?
IronPDF supports conformance levels 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. Information below is from [Adobe's documentation on PDF/A](https://www.adobe.com/uk/acrobat/resources/document-files/pdf-types/pdf-a.html). By default, PDF output generated through IronPDF is PDF/A-3B (ISO 19005-3).
- **Level A** conformance meets all specification requirements, allowing assistive software to improve accessibility for physically impaired users.
- **Level B** has lower conformance with minimal compliance, focusing on preserving visual appearance long-term.
### What are the differences between PDF/A-1, PDF/A-2, and PDF/A-3?
**PDF/A-1:** Based on original PDF 1.4 version.
**PDF/A-2:** Released July 2011 as ISO 19005-2:2011, includes all features of PDF versions up to 1.7 plus new features. Supports JPEG2000 for scanned documents and specific requirements for customized XMP metadata. When working with [PDF metadata](https://ironpdf.com/how-to/metadata/), IronPDF ensures proper XMP metadata handling.
**PDF/A-3:** Includes all Level 2 requirements. Allows embedding additional file formats - XML, CSV, and word processing formats - into PDF/A conforming documents.
**PDF/A-4:** The latest version of the PDF/A compliance standard, released in 2020. It is based on PDF 2.0 and introduces improved functionality, including enhanced support for digital signatures compared to PDF/A-3. This version is best suited for engineering documents and technical workflows that involve 3D models and other complex elements.
<div class="content-table dotnet-core-pdf-table">
<table>
<tbody>
<tr class="tr-head">
<th class="tcol1">Feature</th>
<th class="tcol2">PDF/A-3</th>
<th class="tcol3">PDF/A-4</th>
</tr>
<tr>
<td>Base PDF Version</td>
<td>PDF 1.7</td>
<td>PDF 2.0</td>
</tr>
<tr>
<td>Embedded File Attachments</td>
<td>Supported</td>
<td>Not Supported</td>
</tr>
<tr>
<td>Digital Signatures</td>
<td>Supported</td>
<td>Enhanced Support</td>
</tr>
<tr>
<td>Best Use Case</td>
<td>Invoices, XML data embedding</td>
<td>Engineering, 3D models, technical workflows</td>
</tr>
</tbody>
</table>
</div>
[[i:(IronPDF does not support converting a PDF with an attachment file to PDF/A-3B yet.)]]
## Converting to the latest PDF/A-4 standard
PDF/A-4 is the latest compliance standard in the PDF/A series. It is considered the best archival format for a wide range of document types, particularly those involving digital signatures. The format disallows encryption and multimedia elements, ensuring that each file remains fully self-contained.
Converting an existing file to the PDF/A-4 compliant standard is straightforward.
```csharp
using IronPdf;
// Load an existing PDF
PdfDocument pdf = PdfDocument.FromFile("input.pdf");
// Save as PDF/A-4 compliant document
pdf.SaveAsPdfA("pdfa4-output.pdf", PdfAVersions.PdfA4);
```
## From an Existing PDF File (PDF/A-3B)
This example uses `wikipedia.pdf`, a PDF file generated using IronPDF. For optimal results, ensure you have [configured your license keys](https://ironpdf.com/how-to/license-keys/) properly before starting conversion.
The code below loads and re-saves the file as both PDF/A-3B and PDF/A-4 compliant formats to demonstrate compatibility with both standards.
### What does the input PDF look like before conversion?
<iframe loading="lazy" src="/static-assets/pdf/how-to/pdfa/wikipedia.pdf#view=fit" width="100%" height="500px">
</iframe>
### What code converts existing PDFs to PDF/A format?
```csharp
using IronPdf;
// Create a PdfDocument object or open any PDF File
PdfDocument pdf = PdfDocument.FromFile("wikipedia.pdf");
// Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("pdf-a3-wikipedia.pdf", PdfAVersions.PdfA3b);
```
### How can I verify the PDF/A conversion was successful?
The output file is PDF/A-3b compliant:

<iframe loading="lazy" src="/static-assets/pdf/how-to/pdfa/pdf-a3-wikipedia.pdf#view=fit" width="100%" height="500px">
</iframe>
## From an HTML Design or URL (PDF/A-3B)
This example uses `design.html`, an HTML design file to render from HTML to PDF using IronPDF and export as a PDF/A compliant file. The [HTML file to PDF conversion](https://ironpdf.com/how-to/html-file-to-pdf/) process maintains all styling and formatting during conversion.
The code below saves the output as a PDF/A-3B compliant PDF file.
### How do I convert HTML files to PDF/A format?
```csharp
using IronPdf;
// Use the Chrome Renderer to make beautiful HTML designs
var chromeRenderer = new ChromePdfRenderer();
// Render an HTML design as a PdfDocument object using Chrome
PdfDocument pdf = chromeRenderer.RenderHtmlAsPdf("design.html");
// Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("design-accessible.pdf", PdfAVersions.PdfA3b);
```
The output file is PDF/A-3B compliant:

### How do I convert websites to PDF/A format?
This example renders `https://www.microsoft.com` from URL to PDF using IronPDF and exports it as a PDF/A compliant file. The [URL to PDF conversion](https://ironpdf.com/how-to/url-to-pdf/) feature ensures all web content, including JavaScript and CSS, is properly rendered.
The code below saves the output as a PDF/A-3B compliant PDF file.
```csharp
using IronPdf;
// Use the Chrome Renderer to make beautiful HTML designs from URLs
var chromeRenderer = new ChromePdfRenderer();
// Render a Website as a PdfDocument object using Chrome
PdfDocument pdf = chromeRenderer.RenderUrlAsPdf("https://www.microsoft.com");
// Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("website-accessible.pdf", PdfAVersions.PdfA3b);
```
The output file is PDF/A-3B compliant:

---
## Support Embedding Attachment (PDF/A-3B)
IronPDF supports embedding files into PDF documents during PDF/A conversion using file paths, byte arrays, or streams. This feature creates self-contained archival documents that include all necessary supporting materials. For more advanced PDF manipulation features, check our [PDF editing tutorial](https://ironpdf.com/tutorials/csharp-edit-pdf-complete-tutorial/).
[[i:(Note: Embedded file attachments are supported in PDF/A-3B only. PDF/A-4 does not support embedded attachments.)]]
### Embed with File Paths
Embed files using their file paths. A collection of file paths is provided, and these files are included as attachments during PDF/A conversion.
```csharp
using IronPdf;
using System.Collections.Generic;
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize collection of embed file as string of path
IEnumerable<string> embedPaths = new[] { "File1.xml", "File2.png" };
// Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedPaths);
```
### How do I embed files using byte arrays?
Embed files by providing file content as byte arrays with their file types. Useful when files are already loaded into memory.
```csharp
using IronPdf;
using System.Collections.Generic;
using System.IO;
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize collection of embed file as Bytes and their file type
byte[] fileData1 = File.ReadAllBytes("File1.png");
byte[] fileData2 = File.ReadAllBytes("File2.xml");
var embedFileConfig1 = new EmbedFileConfiguration(EmbedFileType.png);
embedFileConfig1.EmbedFileName = "logo.png";
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,
};
IEnumerable<EmbedFileByte> embedBytes = new[]
{
new EmbedFileByte(fileData1, embedFileConfig1),
new EmbedFileByte(fileData2, embedFileConfig2)
};
// Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedBytes).SaveAs("PdfACompliance.pdf");
```
### How do I embed files using streams?
Embed files using streams for content with their file types. Ideal when file data is processed as a stream.
```csharp
using IronPdf;
using System.Collections.Generic;
using System.IO;
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize collection of embed file as Stream and their file type
Stream stream1 = new MemoryStream(File.ReadAllBytes("File1.png"));
Stream stream2 = new MemoryStream(File.ReadAllBytes("File2.xml"));
var embedFileConfig1 = new EmbedFileConfiguration(EmbedFileType.png);
embedFileConfig1.EmbedFileName = "logo.png";
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,
};
IEnumerable<EmbedFileStream> embedStreams = new[]
{
new EmbedFileStream(stream1, embedFileConfig1),
new EmbedFileStream(stream2, embedFileConfig2)
};
// Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedStreams).SaveAs("PdfACompliance.pdf");
```
### How do I configure embedded file properties with `EmbedFileConfiguration`?
When converting a `PdfDocument` to PDF/A-3 format with embedded files, configure parameters such as `EmbedFilePath`, `EmbedFileByte`, or `EmbedFileStream` to specify the file type, name, and custom XMP metadata.
Proper configuration ensures embedded content is organized effectively and complies with PDF/A-3 standards. Customizing XMP metadata allows additional information about embedded files, enhancing document usability and accessibility. Using the `EmbedFileConfiguration` class, developers easily customize values and formats for the file.
```csharp
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");
```
- `EmbedFileName`: A `string` property representing the embedded file name in the PDF/A document. Default is empty string.
- `AFDesc`: A `string` property representing the associated file description for the embedded file. Default is empty string.
- `ConformanceLevel`: The conformance level of embedding XML files applying to XMP Metadata of PDF/A document. Default is `ConformanceLevel.EN16931`. IronPDF provides different values via the `ConformanceLevel` enum.
- `SchemaNamespace`: The PDF/A Schema NamespaceURI embedding XML files and applying to XMP metadata of PDF/A document. Default is `SchemaNamespace.facturX`, with various options available in the `SchemaNamespace` enum.
- `SchemaPrefix`: The PDF/A Schema Prefix for embedding XML files applying to XMP Metadata of PDF/A document. Default is `SchemaPrefix.fx`, with several options in the `SchemaPrefix` enum.
- `PropertyVersion`: The property version of embedding XML files applied to XMP Metadata of PDF/A document. Default is `PropertyVersion.v1`, with multiple options in the `PropertyVersion` enum.
- `AFRelationship`: The relation of the associated file (embedded file) to the PDF/A document. Several options are available in the `AFRelationship` enum.
## What Causes Character Display Issues in PDF/A?
PDF/A requires all characters in the document to map to a visually and semantically correct font. While not all fonts must be embedded, the font used must support required glyphs. If an incorrect or incomplete font is used, certain characters may appear broken, missing, or incorrectly rendered - especially in languages with special scripts or symbols. For file size optimization considerations, explore our [PDF compression guide](https://ironpdf.com/how-to/pdf-compression/) to balance font embedding with file size.
### Why do some characters appear broken in PDF/A documents?
For example, in the issue below, the top sample uses the correct font and displays characters properly, while the bottom sample fails to render them correctly due to font mismatch.

## From an Existing PDF File (PDF/A-4)
This example uses "ENV-2026-1847-Assessment-Report.pdf", an 8-page municipal environmental impact assessment document. The report demonstrates PDF/A-4's suitability for archiving official government documents that require long-term preservation - environmental studies, regulatory filings, and compliance records that agencies must retain for decades.
PDF/A-4 is ideal for these documents because it guarantees visual fidelity over time, embeds all fonts and resources, and supports the enhanced digital signature capabilities required for official certifications.
### Input file: "ENV-2026-1847-Assessment-Report.pdf"
<iframe loading="lazy" src="/static-assets/pdf/how-to/pdfa/ENV-2026-1847-Assessment-Report.pdf#view=fit" width="100%" height="500px">
</iframe>
### Code
```csharp
using IronPdf;
// Load the environmental impact assessment document
PdfDocument pdf = PdfDocument.FromFile("ENV-2026-1847-Assessment-Report.pdf");
// Save as PDF/A-4 compliant document for long-term archival
pdf.SaveAsPdfA("ENV-2026-1847-Report-PDFA4Compliant.pdf", PdfAVersions.PdfA4);
```
### Output
The output file is PDF/A-4 compliant:

<iframe loading="lazy" src="/static-assets/pdf/how-to/pdfa/ENV-2026-1847-Report-PDFA4Compliant.pdf#view=fit" width="100%" height="500px">
</iframe>
Ready to see what else you can do? Check out our tutorial page here: [Create PDFs](https://ironpdf.com/how-to/create-new-pdfs/)
Your business is spending too much on yearly subscriptions for PDF security and compliance. Consider IronSecureDoc, which provides solutions for managing SaaS services like digital signing, redaction, encryption, and protection, all for a one-time payment. Explore IronSecureDoc's Documentation
IronPDF supports export of PDFs to the PDF/A-3b and PDF/A-4 standards. 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. PDF/A-4 is the latest compliance standard, offering enhanced support for digital signatures.
Section 508 Compliance
IronPDF follows Google's initiative to increase PDF archiving and accessibility for Section 508 compliance. When working with HTML to PDF conversion, our rendering engine preserves all accessibility features.
Why is Section 508 compliance important for PDF/A documents?
Section 508 compliance ensures PDF documents are accessible to individuals with disabilities using assistive technologies like screen readers. PDF/A documents meeting Section 508 standards guarantee content remains accessible throughout archival lifespan. This compliance is critical for government agencies, educational institutions, and organizations providing equal access to information for all users.
Select PDF/A version based on archival requirements
Convert and save as PDF/A compliant document
What PDF/A Versions Does IronPDF Support?
IronPDF supports conformance levels 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. Information below is from Adobe's documentation on PDF/A. By default, PDF output generated through IronPDF is PDF/A-3B (ISO 19005-3).
Level A conformance meets all specification requirements, allowing assistive software to improve accessibility for physically impaired users.
Level B has lower conformance with minimal compliance, focusing on preserving visual appearance long-term.
What are the differences between PDF/A-1, PDF/A-2, and PDF/A-3?
PDF/A-1: Based on original PDF 1.4 version.
PDF/A-2: Released July 2011 as ISO 19005-2:2011, includes all features of PDF versions up to 1.7 plus new features. Supports JPEG2000 for scanned documents and specific requirements for customized XMP metadata. When working with PDF metadata, IronPDF ensures proper XMP metadata handling.
PDF/A-3: Includes all Level 2 requirements. Allows embedding additional file formats - XML, CSV, and word processing formats - into PDF/A conforming documents.
PDF/A-4: The latest version of the PDF/A compliance standard, released in 2020. It is based on PDF 2.0 and introduces improved functionality, including enhanced support for digital signatures compared to PDF/A-3. This version is best suited for engineering documents and technical workflows that involve 3D models and other complex elements.
Feature
PDF/A-3
PDF/A-4
Base PDF Version
PDF 1.7
PDF 2.0
Embedded File Attachments
Supported
Not Supported
Digital Signatures
Supported
Enhanced Support
Best Use Case
Invoices, XML data embedding
Engineering, 3D models, technical workflows
Please note: IronPDF does not support converting a PDF with an attachment file to PDF/A-3B yet.
Converting to the latest PDF/A-4 standard
PDF/A-4 is the latest compliance standard in the PDF/A series. It is considered the best archival format for a wide range of document types, particularly those involving digital signatures. The format disallows encryption and multimedia elements, ensuring that each file remains fully self-contained.
Converting an existing file to the PDF/A-4 compliant standard is straightforward.
using IronPdf;// Load an existing PDFPdfDocument pdf = PdfDocument.FromFile("input.pdf");// Save as PDF/A-4 compliant documentpdf.SaveAsPdfA("pdfa4-output.pdf", PdfAVersions.PdfA4);
using IronPdf;
// Load an existing PDF
PdfDocument pdf = PdfDocument.FromFile("input.pdf");
// Save as PDF/A-4 compliant document
pdf.SaveAsPdfA("pdfa4-output.pdf", PdfAVersions.PdfA4);
ImportsIronPdf' Load an existing PDFDim pdf AsPdfDocument = PdfDocument.FromFile("input.pdf")' Save as PDF/A-4 compliant documentpdf.SaveAsPdfA("pdfa4-output.pdf", PdfAVersions.PdfA4)
Imports IronPdf
' Load an existing PDF
Dim pdf As PdfDocument = PdfDocument.FromFile("input.pdf")
' Save as PDF/A-4 compliant document
pdf.SaveAsPdfA("pdfa4-output.pdf", PdfAVersions.PdfA4)
From an Existing PDF File (PDF/A-3B)
This example uses wikipedia.pdf, a PDF file generated using IronPDF. For optimal results, ensure you have configured your license keys properly before starting conversion.
The code below loads and re-saves the file as both PDF/A-3B and PDF/A-4 compliant formats to demonstrate compatibility with both standards.
What does the input PDF look like before conversion?
What code converts existing PDFs to PDF/A format?
using IronPdf;// Create a PdfDocument object or open any PDF FilePdfDocument pdf = PdfDocument.FromFile("wikipedia.pdf");// Use the SaveAsPdfA method to save to filepdf.SaveAsPdfA("pdf-a3-wikipedia.pdf", PdfAVersions.PdfA3b);
using IronPdf;
// Create a PdfDocument object or open any PDF File
PdfDocument pdf = PdfDocument.FromFile("wikipedia.pdf");
// Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("pdf-a3-wikipedia.pdf", PdfAVersions.PdfA3b);
ImportsIronPdf' Create a PdfDocument object or open any PDF FileDim pdf AsPdfDocument = PdfDocument.FromFile("wikipedia.pdf")' Use the SaveAsPdfA method to save to filepdf.SaveAsPdfA("pdf-a3-wikipedia.pdf", PdfAVersions.PdfA3b)
Imports IronPdf
' Create a PdfDocument object or open any PDF File
Dim pdf As PdfDocument = PdfDocument.FromFile("wikipedia.pdf")
' Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("pdf-a3-wikipedia.pdf", PdfAVersions.PdfA3b)
How can I verify the PDF/A conversion was successful?
The output file is PDF/A-3b compliant:
From an HTML Design or URL (PDF/A-3B)
This example uses design.html, an HTML design file to render from HTML to PDF using IronPDF and export as a PDF/A compliant file. The HTML file to PDF conversion process maintains all styling and formatting during conversion.
The code below saves the output as a PDF/A-3B compliant PDF file.
How do I convert HTML files to PDF/A format?
using IronPdf;// Use the Chrome Renderer to make beautiful HTML designsvar chromeRenderer = new ChromePdfRenderer();// Render an HTML design as a PdfDocument object using ChromePdfDocument pdf = chromeRenderer.RenderHtmlAsPdf("design.html");// Use the SaveAsPdfA method to save to filepdf.SaveAsPdfA("design-accessible.pdf", PdfAVersions.PdfA3b);
using IronPdf;
// Use the Chrome Renderer to make beautiful HTML designs
var chromeRenderer = new ChromePdfRenderer();
// Render an HTML design as a PdfDocument object using Chrome
PdfDocument pdf = chromeRenderer.RenderHtmlAsPdf("design.html");
// Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("design-accessible.pdf", PdfAVersions.PdfA3b);
ImportsIronPdf' Use the Chrome Renderer to make beautiful HTML designsPrivate chromeRenderer = New ChromePdfRenderer()' Render an HTML design as a PdfDocument object using ChromePrivate pdf AsPdfDocument = chromeRenderer.RenderHtmlAsPdf("design.html")' Use the SaveAsPdfA method to save to filepdf.SaveAsPdfA("design-accessible.pdf", PdfAVersions.PdfA3b)
Imports IronPdf
' Use the Chrome Renderer to make beautiful HTML designs
Private chromeRenderer = New ChromePdfRenderer()
' Render an HTML design as a PdfDocument object using Chrome
Private pdf As PdfDocument = chromeRenderer.RenderHtmlAsPdf("design.html")
' Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("design-accessible.pdf", PdfAVersions.PdfA3b)
The output file is PDF/A-3B compliant:
How do I convert websites to PDF/A format?
This example renders https://www.microsoft.com from URL to PDF using IronPDF and exports it as a PDF/A compliant file. The URL to PDF conversion feature ensures all web content, including JavaScript and CSS, is properly rendered.
The code below saves the output as a PDF/A-3B compliant PDF file.
using IronPdf;// Use the Chrome Renderer to make beautiful HTML designs from URLsvar chromeRenderer = new ChromePdfRenderer();// Render a Website as a PdfDocument object using ChromePdfDocument pdf = chromeRenderer.RenderUrlAsPdf("https://www.microsoft.com");// Use the SaveAsPdfA method to save to filepdf.SaveAsPdfA("website-accessible.pdf", PdfAVersions.PdfA3b);
using IronPdf;
// Use the Chrome Renderer to make beautiful HTML designs from URLs
var chromeRenderer = new ChromePdfRenderer();
// Render a Website as a PdfDocument object using Chrome
PdfDocument pdf = chromeRenderer.RenderUrlAsPdf("https://www.microsoft.com");
// Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("website-accessible.pdf", PdfAVersions.PdfA3b);
ImportsIronPdf' Use the Chrome Renderer to make beautiful HTML designs from URLsPrivate chromeRenderer = New ChromePdfRenderer()' Render a Website as a PdfDocument object using ChromePrivate pdf AsPdfDocument = chromeRenderer.RenderUrlAsPdf("https://www.microsoft.com")' Use the SaveAsPdfA method to save to filepdf.SaveAsPdfA("website-accessible.pdf", PdfAVersions.PdfA3b)
Imports IronPdf
' Use the Chrome Renderer to make beautiful HTML designs from URLs
Private chromeRenderer = New ChromePdfRenderer()
' Render a Website as a PdfDocument object using Chrome
Private pdf As PdfDocument = chromeRenderer.RenderUrlAsPdf("https://www.microsoft.com")
' Use the SaveAsPdfA method to save to file
pdf.SaveAsPdfA("website-accessible.pdf", PdfAVersions.PdfA3b)
The output file is PDF/A-3B compliant:
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.
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.
IronPDF supports embedding files into PDF documents during PDF/A conversion using file paths, byte arrays, or streams. This feature creates self-contained archival documents that include all necessary supporting materials. For more advanced PDF manipulation features, check our PDF editing tutorial.
Please note: Note: Embedded file attachments are supported in PDF/A-3B only. PDF/A-4 does not support embedded attachments.
Embed with File Paths
Embed files using their file paths. A collection of file paths is provided, and these files are included as attachments during PDF/A conversion.
using IronPdf;using System.Collections.Generic;PdfDocument pdf = new PdfDocument("Google.pdf");// Initialize collection of embed file as string of pathIEnumerable<string> embedPaths = new[] { "File1.xml", "File2.png" };// Convert to Pdf/A-3B with embeded filespdf.ConvertToPdfA(embedPaths);
using IronPdf;
using System.Collections.Generic;
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize collection of embed file as string of path
IEnumerable<string> embedPaths = new[] { "File1.xml", "File2.png" };
// Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedPaths);
ImportsIronPdfImportsSystem.Collections.GenericPrivate pdf As New PdfDocument("Google.pdf")' Initialize collection of embed file as string of pathPrivate embedPaths AsIEnumerable(OfString) = { "File1.xml", "File2.png" }' Convert to Pdf/A-3B with embeded filespdf.ConvertToPdfA(embedPaths)
Imports IronPdf
Imports System.Collections.Generic
Private pdf As New PdfDocument("Google.pdf")
' Initialize collection of embed file as string of path
Private embedPaths As IEnumerable(Of String) = { "File1.xml", "File2.png" }
' Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedPaths)
How do I embed files using byte arrays?
Embed files by providing file content as byte arrays with their file types. Useful when files are already loaded into memory.
using IronPdf;using System.Collections.Generic;using System.IO;PdfDocument pdf = new PdfDocument("Google.pdf");// Initialize collection of embed file as Bytes and their file typebyte[] fileData1 = File.ReadAllBytes("File1.png");byte[] fileData2 = File.ReadAllBytes("File2.xml");var embedFileConfig1 = new EmbedFileConfiguration(EmbedFileType.png);embedFileConfig1.EmbedFileName = "logo.png";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,};IEnumerable<EmbedFileByte> embedBytes = new[]{ new EmbedFileByte(fileData1, embedFileConfig1), new EmbedFileByte(fileData2, embedFileConfig2)};// Convert to Pdf/A-3B with embeded filespdf.ConvertToPdfA(embedBytes).SaveAs("PdfACompliance.pdf");
using IronPdf;
using System.Collections.Generic;
using System.IO;
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize collection of embed file as Bytes and their file type
byte[] fileData1 = File.ReadAllBytes("File1.png");
byte[] fileData2 = File.ReadAllBytes("File2.xml");
var embedFileConfig1 = new EmbedFileConfiguration(EmbedFileType.png);
embedFileConfig1.EmbedFileName = "logo.png";
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,
};
IEnumerable<EmbedFileByte> embedBytes = new[]
{
new EmbedFileByte(fileData1, embedFileConfig1),
new EmbedFileByte(fileData2, embedFileConfig2)
};
// Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedBytes).SaveAs("PdfACompliance.pdf");
ImportsIronPdfImportsSystem.Collections.GenericImportsSystem.IOPrivate pdf As New PdfDocument("Google.pdf")' Initialize collection of embed file as Bytes and their file typePrivate fileData1() AsByte = File.ReadAllBytes("File1.png")Private fileData2() AsByte = File.ReadAllBytes("File2.xml")Private embedFileConfig1 = New EmbedFileConfiguration(EmbedFileType.png)embedFileConfig1.EmbedFileName = "logo.png"Dim 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}Dim embedBytes AsIEnumerable(OfEmbedFileByte) = { New EmbedFileByte(fileData1, embedFileConfig1), New EmbedFileByte(fileData2, embedFileConfig2)}' Convert to Pdf/A-3B with embeded filespdf.ConvertToPdfA(embedBytes).SaveAs("PdfACompliance.pdf")
Imports IronPdf
Imports System.Collections.Generic
Imports System.IO
Private pdf As New PdfDocument("Google.pdf")
' Initialize collection of embed file as Bytes and their file type
Private fileData1() As Byte = File.ReadAllBytes("File1.png")
Private fileData2() As Byte = File.ReadAllBytes("File2.xml")
Private embedFileConfig1 = New EmbedFileConfiguration(EmbedFileType.png)
embedFileConfig1.EmbedFileName = "logo.png"
Dim 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
}
Dim embedBytes As IEnumerable(Of EmbedFileByte) = {
New EmbedFileByte(fileData1, embedFileConfig1),
New EmbedFileByte(fileData2, embedFileConfig2)
}
' Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedBytes).SaveAs("PdfACompliance.pdf")
How do I embed files using streams?
Embed files using streams for content with their file types. Ideal when file data is processed as a stream.
using IronPdf;using System.Collections.Generic;using System.IO;PdfDocument pdf = new PdfDocument("Google.pdf");// Initialize collection of embed file as Stream and their file typeStream stream1 = new MemoryStream(File.ReadAllBytes("File1.png"));Stream stream2 = new MemoryStream(File.ReadAllBytes("File2.xml"));var embedFileConfig1 = new EmbedFileConfiguration(EmbedFileType.png);embedFileConfig1.EmbedFileName = "logo.png";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,};IEnumerable<EmbedFileStream> embedStreams = new[]{ new EmbedFileStream(stream1, embedFileConfig1), new EmbedFileStream(stream2, embedFileConfig2)};// Convert to Pdf/A-3B with embeded filespdf.ConvertToPdfA(embedStreams).SaveAs("PdfACompliance.pdf");
using IronPdf;
using System.Collections.Generic;
using System.IO;
PdfDocument pdf = new PdfDocument("Google.pdf");
// Initialize collection of embed file as Stream and their file type
Stream stream1 = new MemoryStream(File.ReadAllBytes("File1.png"));
Stream stream2 = new MemoryStream(File.ReadAllBytes("File2.xml"));
var embedFileConfig1 = new EmbedFileConfiguration(EmbedFileType.png);
embedFileConfig1.EmbedFileName = "logo.png";
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,
};
IEnumerable<EmbedFileStream> embedStreams = new[]
{
new EmbedFileStream(stream1, embedFileConfig1),
new EmbedFileStream(stream2, embedFileConfig2)
};
// Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedStreams).SaveAs("PdfACompliance.pdf");
ImportsIronPdfImportsSystem.Collections.GenericImportsSystem.IOPrivate pdf As New PdfDocument("Google.pdf")' Initialize collection of embed file as Stream and their file typePrivate stream1 AsStream = New MemoryStream(File.ReadAllBytes("File1.png"))Private stream2 AsStream = New MemoryStream(File.ReadAllBytes("File2.xml"))Private embedFileConfig1 = New EmbedFileConfiguration(EmbedFileType.png)embedFileConfig1.EmbedFileName = "logo.png"Dim 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}Dim embedStreams AsIEnumerable(OfEmbedFileStream) = { New EmbedFileStream(stream1, embedFileConfig1), New EmbedFileStream(stream2, embedFileConfig2)}' Convert to Pdf/A-3B with embeded filespdf.ConvertToPdfA(embedStreams).SaveAs("PdfACompliance.pdf")
Imports IronPdf
Imports System.Collections.Generic
Imports System.IO
Private pdf As New PdfDocument("Google.pdf")
' Initialize collection of embed file as Stream and their file type
Private stream1 As Stream = New MemoryStream(File.ReadAllBytes("File1.png"))
Private stream2 As Stream = New MemoryStream(File.ReadAllBytes("File2.xml"))
Private embedFileConfig1 = New EmbedFileConfiguration(EmbedFileType.png)
embedFileConfig1.EmbedFileName = "logo.png"
Dim 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
}
Dim embedStreams As IEnumerable(Of EmbedFileStream) = {
New EmbedFileStream(stream1, embedFileConfig1),
New EmbedFileStream(stream2, embedFileConfig2)
}
' Convert to Pdf/A-3B with embeded files
pdf.ConvertToPdfA(embedStreams).SaveAs("PdfACompliance.pdf")
How do I configure embedded file properties with EmbedFileConfiguration?
When converting a PdfDocument to PDF/A-3 format with embedded files, configure parameters such as EmbedFilePath, EmbedFileByte, or EmbedFileStream to specify the file type, name, and custom XMP metadata.
Proper configuration ensures embedded content is organized effectively and complies with PDF/A-3 standards. Customizing XMP metadata allows additional information about embedded files, enhancing document usability and accessibility. Using the EmbedFileConfiguration class, developers easily customize 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");
ImportsSystemDim config As New EmbedFileConfigurationWith { .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 documentDim document = PdfDocument.FromFile("wikipedia.pdf")' Configure embedded file parametersdocument.EmbedFileFromFilePath("path/to/attachment", config)' Save the document as PDF/A-3bdocument.SaveAsPdfA3B("output-with-configured-attachment.pdf")
Imports System
Dim config As 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: A string property representing the embedded file name in the PDF/A document. Default is empty string.
AFDesc: A string property representing the associated file description for the embedded file. Default is empty string.
ConformanceLevel: The conformance level of embedding XML files applying to XMP Metadata of PDF/A document. Default is ConformanceLevel.EN16931. IronPDF provides different values via the ConformanceLevel enum.
SchemaNamespace: The PDF/A Schema NamespaceURI embedding XML files and applying to XMP metadata of PDF/A document. Default is SchemaNamespace.facturX, with various options available in the SchemaNamespace enum.
SchemaPrefix: The PDF/A Schema Prefix for embedding XML files applying to XMP Metadata of PDF/A document. Default is SchemaPrefix.fx, with several options in the SchemaPrefix enum.
PropertyVersion: The property version of embedding XML files applied to XMP Metadata of PDF/A document. Default is PropertyVersion.v1, with multiple options in the PropertyVersion enum.
AFRelationship: The relation of the associated file (embedded file) to the PDF/A document. Several options are available in the AFRelationship enum.
What Causes Character Display Issues in PDF/A?
PDF/A requires all characters in the document to map to a visually and semantically correct font. While not all fonts must be embedded, the font used must support required glyphs. If an incorrect or incomplete font is used, certain characters may appear broken, missing, or incorrectly rendered - especially in languages with special scripts or symbols. For file size optimization considerations, explore our PDF compression guide to balance font embedding with file size.
Why do some characters appear broken in PDF/A documents?
For example, in the issue below, the top sample uses the correct font and displays characters properly, while the bottom sample fails to render them correctly due to font mismatch.
From an Existing PDF File (PDF/A-4)
This example uses "ENV-2026-1847-Assessment-Report.pdf", an 8-page municipal environmental impact assessment document. The report demonstrates PDF/A-4's suitability for archiving official government documents that require long-term preservation - environmental studies, regulatory filings, and compliance records that agencies must retain for decades.
PDF/A-4 is ideal for these documents because it guarantees visual fidelity over time, embeds all fonts and resources, and supports the enhanced digital signature capabilities required for official certifications.
Input file: "ENV-2026-1847-Assessment-Report.pdf"
Code
using IronPdf;// Load the environmental impact assessment documentPdfDocument pdf = PdfDocument.FromFile("ENV-2026-1847-Assessment-Report.pdf");// Save as PDF/A-4 compliant document for long-term archivalpdf.SaveAsPdfA("ENV-2026-1847-Report-PDFA4Compliant.pdf", PdfAVersions.PdfA4);
using IronPdf;
// Load the environmental impact assessment document
PdfDocument pdf = PdfDocument.FromFile("ENV-2026-1847-Assessment-Report.pdf");
// Save as PDF/A-4 compliant document for long-term archival
pdf.SaveAsPdfA("ENV-2026-1847-Report-PDFA4Compliant.pdf", PdfAVersions.PdfA4);
ImportsIronPdf' Load the environmental impact assessment documentDim pdf AsPdfDocument = PdfDocument.FromFile("ENV-2026-1847-Assessment-Report.pdf")' Save as PDF/A-4 compliant document for long-term archivalpdf.SaveAsPdfA("ENV-2026-1847-Report-PDFA4Compliant.pdf", PdfAVersions.PdfA4)
Imports IronPdf
' Load the environmental impact assessment document
Dim pdf As PdfDocument = PdfDocument.FromFile("ENV-2026-1847-Assessment-Report.pdf")
' Save as PDF/A-4 compliant document for long-term archival
pdf.SaveAsPdfA("ENV-2026-1847-Report-PDFA4Compliant.pdf", PdfAVersions.PdfA4)
Output
The output file is PDF/A-4 compliant:
Ready to see what else you can do? Check out our tutorial page here: Create PDFs
Frequently Asked Questions
What is PDF/A-3B and how does IronPDF support it?
PDF/A-3B is a strict subset of the ISO PDF specification used for creating archival versions of documents that should render consistently over time. IronPDF supports the export of PDFs to the PDF/A-3B standard, ensuring compliance for long-term document preservation.
How does IronPDF ensure Section 508 accessibility compliance?
IronPDF uses Google Chromium's HTML rendering engine to maintain Section 508 accessibility features during HTML to PDF conversion. This ensures that PDF documents remain accessible to individuals using assistive technologies, complying with Section 508 standards.
What are the differences between PDF/A-1, PDF/A-2, and PDF/A-3, and how does IronPDF support these versions?
PDF/A-1 is based on the original PDF 1.4 standard, PDF/A-2 includes features up to PDF 1.7, and PDF/A-3 adds support for embedding additional file formats. IronPDF supports all these standards, allowing you to choose the appropriate version based on your archival requirements.
Can IronPDF handle digital signatures within PDF/A documents?
Yes, IronPDF supports enhanced digital signature functionality, specifically with PDF/A-4, the latest compliance standard which offers improved support for digital signatures compared to previous PDF/A versions.
How can IronPDF convert HTML or URLs into PDF/A-compliant documents?
IronPDF can convert HTML files or URLs to PDF/A-compliant documents using its Chrome Renderer. This process ensures all web content, including styling and JavaScript, is accurately rendered and converted to meet PDF/A standards.
Does IronPDF allow embedding files within PDF/A documents?
IronPDF supports embedding files in PDF/A-3B documents using file paths, byte arrays, or streams. This feature is useful for creating self-contained archival documents with all necessary supporting materials included.
What steps are involved in converting PDFs to PDF/A format using IronPDF?
The process involves downloading the IronPDF library, loading an existing PDF or rendering from HTML/URL, selecting the desired PDF/A version, and finally converting and saving the document as a PDF/A-compliant file.
How can IronPDF help solve character display issues in PDF/A documents?
Character display issues often arise due to incorrect font mappings. IronPDF ensures that appropriate fonts supporting required glyphs are used, preventing broken or missing characters and maintaining the document's visual integrity over time.
What types of documents benefit from conversion to PDF/A-4 using IronPDF?
PDF/A-4 is suitable for documents that require long-term preservation, such as engineering documents, environmental studies, regulatory filings, and compliance records. IronPDF ensures these documents remain visually consistent and digitally signed if needed.
Why is PDF/A compliance important for archival and regulatory documents?
PDF/A compliance is crucial for ensuring that documents can be reliably preserved and rendered over time. It meets legal and regulatory requirements for document archiving and ensures accessibility and integrity for future access.
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.