1. Home
  2. /
  3. GroupDocs.Conversion.LowCode
  4. /
  5. GroupDocs.Conversion.LowCode
  6. /
  7. PdfToPdfAConverter

PdfToPdfAConverter class

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 and PdfConvertOptions
  • Stream and file-based conversion support

Code Examples:

See the LowCode developer guide for more details: https://docs.groupdocs.net/conversion/developer-guide/

public sealed class PdfToPdfAConverter : Converter<PdfLoadOptions, PdfConvertOptions>

Public Members

namedescription
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)

Remarks

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;
});

See Also