Convert PDF/A to standard PDF in C++

Use Aspose.PDF for C++ to remove PDF/A compliance information from an existing PDF/A document and save the result as a regular PDF. The following example uses the Document API rather than a format-specific load option.

Remove PDF/A compliance information

Open a PDF/A document and remove its PDF/A compliance information before saving.

This operation removes PDF/A compliance information. It does not convert the document to another archival PDF standard.

  1. Open the input PDF/A file as a Document.
  2. Call RemovePdfaCompliance().
  3. Save the output file with Save().

#include <Aspose.PDF.Cpp/Document.h>

using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Text;

void ConvertPDFAtoPDF(String path_infile, String path_outfile)
{
    auto document = MakeObject<Document>(path_infile);
    // Remove PDF/A compliance information
    document->RemovePdfaCompliance();
    // Save updated document
    document->Save(path_outfile);
}