How to Convert PDF to Text API with CURL

Oct 10, 2024·2 Minutes Read

In this tutorial, we are going to see how to convert a PDF to text using the PDF.co with CURL. CURL is basically command line URL and we will see how to use the common line executables and let’s see how to implement that step of the API program here.

Step 1: Enter API Key and Source URL or Input File

We need to setup the following:

  • Provide our API key.
  • Provide our source URL.
  • Leave "Pages" blank to indicate we want to convert all pages .
  • Leave the "Password" blank as the PDF file is not password protected.
  • The API is convert to text.
Screenshot of code setup
Screenshot of code setup

Step 2: Execute the PDF to Text Query

In PowerShell we run the CURL command by double clicking the `.cmd` file. We want to store it into this response.json file.

PowerShell window
PowerShell window

Step 3: Check the Output

In the output text you should have received a URL to the JSON file. This file will contain the PDF output as text.

Watch the video for more!

Related Tutorials

See Related Tutorials