How to Convert PDF files to TIFF in Python

  1. Make Folder for Files
  2. Requests Module Installation
  3. Add API Key
  4. Source PDF and Destination
  5. Run Program
  6. Demo

In this demonstration, we will convert PDF files to TIFF in Python. We will use the /v1/pdf/convert/to/tiff endpoint. Below is the sample source PDF and the converted images.

Sample Source PDF and Converted Image
Sample Source PDF and Converted Images

Step 1: Make Folder for Files

First, add your files to the Python program folder. You can download our sample file and Python code at this link.

Step 2: Requests Module Installation

Next, install the requests module. Then, type python -m pip install requests in your command line and press enter to install the pip requests.

Step 3: Add API Key

Then, open the Python sample code and add the PDF.co API Key in line 6. You can get the API Key in your PDF.co dashboard.

PDF.co API Key

Step 4: Source PDF and Destination

In lines 12 and 14, enter your source PDF file and type the TIFF file name output.

Source PDF and Destination

Step 5: Run Program

Now, let’s run the Python program, and you will see the result in your folder.

Run Program

Step 6: Demo

Here’s the PDF to TIFF Web API in action.

PDF.co PDF to Tiff Web API in Python
PDF.co PDF Extractor Web API in Python

In this tutorial, you learned how to convert PDF files to TIFF in Python. You learned how to use PDF Extractor Web API to convert PDF to Images. You also learned how to install the requests module.

Related Pages:

Related Samples: