Convert a PDF to PDF/A in Python

While PDF is now a household name for saving and sharing document files, it is not always fully compatible with different operating systems. To ensure that your documents always look the way that they are meant to be formatted, the following API will convert PDF files to PDF/A, which is a universal, standardized version of the PDF file type.

Image for post
Image for post

You can use this API by running this command to install the SDK:

pip install cloudmersive-convert-api-client

Then, you can call the function:

from __future__ import print_function
import time
import cloudmersive_convert_api_client
from cloudmersive_convert_api_client.rest import ApiException
from pprint import pprint

You also have the option to specify the conformance level for your PDF/A document. Specify “1b” for PDF/A-1b or “2b” for PDF/A-2b. The default is PDF/A-1b. You can retrieve the API Key from the Cloudmersive website at no cost and with no commitment. This will provide you with 800 monthly calls across our library of APIs.

Written by

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store