Convert PDF/A and PDF/UA to PDF in Java
Contents
[
Hide
]
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.
- Open the source PDF/A document.
- Run the conversion that removes the PDF/A compliance profile.
- 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.
- Open the source PDF/UA document.
- Run the conversion that removes the PDF/UA compliance profile.
- 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());
}
}