Convert PDF/A and PDF/UA to PDF in Python
Use this page when you need to convert a standards-based PDF, such as PDF/A or PDF/UA, back into a regular PDF document for downstream editing, processing, or redistribution.
Standards-compliant PDFs are helpful for archival, print, and accessibility workflows, but in some cases you may need to remove that compliance before integrating the file into other systems or pipelines. Aspose.PDF for Python via .NET lets you do that programmatically and then save the result as a standard PDF file.
Convert PDF/A to PDF
This example removes PDF/A compliance metadata and restrictions from a PDF so that the document can be saved as a regular PDF file again.
- Load the PDF document using ‘ap.Document’.
- Call ‘remove_pdfa_compliance()’ to strip all PDF/A-related compliance settings and metadata.
- Save the resulting PDF to the output path.
import aspose.pdf as ap
from os import path
import sys
def convert_PDFA_to_PDF(infile, outfile):
document = ap.Document(infile)
document.remove_pdfa_compliance()
document.save(outfile)
Removing PDF/UA compliance
This example demonstrates how to remove PDF/UA-related compliance so the document can be saved as a standard PDF for non-accessibility-specific workflows.
- Load the PDF document using ‘ap.Document()’.
- Call ‘document.remove_pdfa_compliance()’ to remove any PDF/A restrictions or compliance settings.
- Save the modified PDF to ‘path_outfile’.
import aspose.pdf as ap
from os import path
import sys
def convert_PDFUA_to_PDF(infile, outfile):
document = ap.Document(infile)
document.remove_pdf_ua_compliance()
document.save(outfile)
When to use this workflow
- Remove compliance settings before sending a document into a toolchain that does not require PDF/A or PDF/UA restrictions.
- Simplify downstream document processing when archival or accessibility metadata is no longer needed.
- Normalize input PDFs before exporting them to other formats.
Related conversions
- Convert PDF to PDF/A, PDF/E, and PDF/X if you need the opposite workflow and want to create standards-compliant PDFs.
- Convert PDF to Word for editable document output after removing compliance constraints.
- Convert PDF to HTML for browser-friendly output from standard PDF files.