Convert PDF to PDF/A formats

Aspose.PDF for .NET allows you to convert a PDF file to a PDF/A compliant PDF file. Before doing so, the file must be validated. This topic explains how.

Convert the file using the Document class Convert method. Before converting the PDF to PDF/A compliant file, validate the PDF using the Validate method. The validation result is stored in an XML file and then this result is also passed to the Convert method. You can also specify the action for the elements which cannot be converted using the ConvertErrorAction enumeration.

The following code snippet also work with Aspose.PDF.Drawing library.

Supported standards

We support the following standards: PDF/A-1b, PDF/A-1a, PDF/A-2b, PDF/A-2u, PDF/A-2a, PDF/A-3b, PDF/A-3u, PDF/A-3a, PDF/A-4, PDF/A-4e, PDF/A-4f.

Convert PDF file to PDF/A-1b

The following code snippet shows how to convert PDF files to PDF/A-1b compliant PDF.

To perform validation only, use the following line of code:

Convert PDF file to PDF/A-3b

Aspose.PDF for .NET also supports the feature to convert a PDF file to PDF/A-3b format.

Convert PDF file to PDF/A-4

Aspose.PDF for .NET also supports the feature to convert a PDF file to PDF/A-4 format.

Add Attachment to PDF/A file

In case you have a requirement to attach files to a PDF/A compliant document, then we recommend using a PDF_A_3A value from the Aspose.PDF.PdfFormat enumeration. PDF/A-3a is the format that provides the feature to attach any file format as an attachment to a PDF/A compliant file.

Replace missing fonts with alternative fonts

As per PDF/A standards, fonts should be embedded in a PDF/A document. However, if the fonts are not embedded in the source document and don’t exist on the machine then PDF/A conversion fails. In this case, it’s necessary to substitute missing fonts with some alternative fonts existing in the machine. Missing fonts can be substituted using the SimpleFontSubsitution class during the PDF to PDF/A conversion.