PdfToPdfAConverter class
Leave feedback
On this page
Provides a simple API to convert PDF documents to PDF/A format using the GroupDocs.Conversion LowCode interface.
This converter is part of the LowCode API, which allows you to perform PDF to PDF/A conversions with minimal code and configuration.
Features:
- Convert PDF files to PDF/A format for long-term preservation
- Support for password-protected PDF documents
- Customize loading and conversion via
PdfLoadOptions
andPdfConvertOptions
- Stream and file-based conversion support
Code Examples:
- C# examples: groupdocs-conversion-lowcode-examples-csharp
- VB.NET examples: groupdocs-conversion-lowcode-examples-vbnet
- F# examples: groupdocs-conversion-lowcode-examples-fsharp
See the LowCode developer guide for more details: https://docs.groupdocs.net/conversion/developer-guide/
public sealed class PdfToPdfAConverter : Converter<PdfLoadOptions, PdfConvertOptions>
name | description |
---|---|
PdfToPdfAConverter(…) | Initializes a new instance of the PdfToPdfAConverter class for converting PDF documents to PDF/A. (2 constructors) |
Convert(…) | Converts the loaded PDF document to PDF/A and saves it to the specified file path. (2 methods) |
Example - Basic conversion:
using GroupDocs.Conversion.LowCode;
// Load license keys
var publicKey = Environment.GetEnvironmentVariable("GD_PUBLIC_KEY");
var privateKey = Environment.GetEnvironmentVariable("GD_PRIVATE_KEY");
// Apply the license
License.Set(publicKey, privateKey);
// Create a converter for the PDF file
var converter = new PdfToPdfAConverter("document.pdf");
// Convert PDF to PDF/A
converter.Convert("document-pdfa.pdf");
Example - Advanced conversion with options:
var converter = new PdfToPdfAConverter("protected.pdf", options =>
{
options.Password = "12345";
options.RemoveEmbeddedFiles = true;
});
converter.Convert("document-pdfa.pdf", convertOptions =>
{
convertOptions.PdfOptions.PdfFormat = PdfFormats.PdfA_2A;
});
- namespace GroupDocs.Conversion.LowCode
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.