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.
Please note we follow Adobe Preflight and veraPDF for validating PDF/A conformance. All tools on the market have their own “representation” of PDF/A conformance. Please check this article on PDF/A validation tools for reference. We chose Adobe products for verifying how Aspose.PDF produces PDF files because Adobe is at the center of everything connected to PDF.
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.
Try to convert PDF to PDF/A online
Aspose.PDF for .NET presents you online free application “PDF to PDF/A-1A”, where you may try to investigate the functionality and quality it works.
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.