PDF to PDF/A
The Documentize PDF Converter for .NET is a powerful tool designed to convert PDF documents into the PDF/A format, ensuring that your content remains compliant with long-term archiving standards. This plugin also supports validating existing PDF documents for PDF/A compliance, offering both conversion and validation features in a single solution.
How to Convert PDF to PDF/A
To convert a PDF document into PDF/A format, follow these steps:
- Create an instance of
PdfToPdfAOptionsto configure the conversion. - Specify the desired PDF/A version (e.g., PDF/A-3B).
- Add the input PDF file using the
AddInputmethod. - Add the output file for the resulting PDF/A using the
AddOutputmethod. - Call the
Convertmethod to execute the conversion.
1// Create the options class to set up the conversion process
2var options = new PdfToPdfAOptions
3{
4 PdfAVersion = PdfAStandardVersion.PDF_A_3B
5};
6
7// Add the source file
8options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf")); // replace with your actual file path
9
10// Add the path to save the converted file
11options.AddOutput(new FileDataSource("path_to_the_converted_file.pdf"));
12
13// Run the conversion
14PdfConverter.Convert(options);Validating PDF/A Compliance
You can validate existing PDF files for PDF/A compliance using the PdfAValidateOptions class.
1// Create the options class to set up the validation process
2var options = new PdfAValidateOptions
3{
4 PdfAVersion = PdfAStandardVersion.PDF_A_1A
5};
6
7// Add one or more files to be validated
8options.AddInput(new FileDataSource("path_to_your_first_pdf_file.pdf")); // replace with your actual file path
9options.AddInput(new FileDataSource("path_to_your_second_pdf_file.pdf"));
10// add more files as needed
11
12// Run the validation and get results
13var resultContainer = PdfConverter.Validate(options);
14
15// Check the resultContainer.ResultCollection property for validation results for each file:
16for (var i = 0; i < resultContainer.ResultCollection.Count; i++)
17{
18 var result = resultContainer.ResultCollection[i];
19 var validationResult = (PdfAValidationResult) result.Data;
20 var isValid = validationResult.IsValid; // Validation result for the i-th document
21}Key Features:
- Convert to PDF/A: Seamlessly transform PDF files into the PDF/A format (such as PDF/A-1a, PDF/A-2b, PDF/A-3b) to ensure compliance with archiving standards.
- Validate PDF/A Compliance: Check existing PDF documents for conformance with PDF/A standards and identify issues if they do not comply.
- Efficient Workflow: Minimize time and effort with fast and reliable conversion processes.