Convert PDF/A and PDF/UA to PDF in Java

Aspose.PDF for Java can convert standards-compliant PDF variants back to a regular PDF document.

Convert PDF/A to standard PDF

Use this example when an archival PDF/A document should be downgraded to a standard PDF.

  1. Open the source PDF/A document.
  2. Run the conversion that removes the PDF/A compliance profile.
  3. Save the resulting standard PDF file.
public static void convertPdfAToPdf(Path inputFile, Path outputFile) {
    try (Document document = new Document(inputFile.toString())) {
        document.removePdfaCompliance();
        document.save(outputFile.toString());
    }
}

Convert PDF/UA to standard PDF

Use this example when an accessible PDF/UA document should be converted back to a standard PDF.

  1. Open the source PDF/UA document.
  2. Run the conversion that removes the PDF/UA compliance profile.
  3. Save the resulting PDF document.
public static void convertPdfUaToPdf(Path inputFile, Path outputFile) {
    try (Document document = new Document(inputFile.toString())) {
        document.removePdfUaCompliance();
        document.save(outputFile.toString());
    }
}