Extract Text from a Rectangular Area of a PDF Using Make
In this tutorial, we will show you how to extract specific rectangular areas in PDF using PDF.co and Make.
This tutorial uses PDF.co’s PDF-to-text operation to read text from a selected rectangular area of a PDF. The output is text, not a cropped image or a new PDF containing the selected region. Use the sample invoice to check the extraction area before sending the result to another application.

Step 1: Create a New Scenario
- First, open your Make account and click on the Create a New Scenario button.
Step 2: Google Drive Module
- Next, select the Google Drive app and choose the Download a File module.

Step 3: Google Drive Configuration
Let’s set up the Google Drive configuration.
- For the Enter a File ID field, enter the Select from the list option.
- In the Choose a Drive field, select My Drive.
- In File ID, select the specific PDF file to download, not its containing folder. If a preceding module finds or watches files, map that module’s file ID into this field.

After setting up the configuration, run the scenario to fetch the file from your Google Drive.
Step 4: Add PDF.co Module
- Let’s add another module and select PDF.co. Then, choose the Make an API Call module.

Step 5: PDF.co Configuration
Let’s set up the PDF.co configuration.
- API Endpoint Path: Enter
/pdf/convert/to/text. The Make module already useshttps://api.pdf.co/v1as its base URL. - For the Input Type field, select the Upload files and inject as ‘url’ param option. It will automatically input files from Google Drive.
- For the Output File Name field, enter the desired name of the output file.
- Body: Set the key to
rectand enter the existing coordinate values as a space-separated string:x y width height, not comma-separated values.


Once you are done setting up the configuration, you may now run the scenario to see the result.
Step 6: Run Scenario Result
- Great! We successfully run the scenario. Copy the URL and paste it into your browser to view the output.

Step 7: Output
- Here’s the extracted text output using the rectangular area with PDF.co and Make.

You have extracted text from a selected rectangular area of a PDF using PDF.co and Make. Compare the output with the source region to confirm that the required text is included and unrelated content is excluded.
Related Tutorials

