Search and Replace Text in PDF – Step-by-step Guide

Let’s find out how to find and replace text in PDF files using PDF.co and Integromat. Here are the steps to follow:

  1. See Sample PDF File
  2. Make an API Call
  3. Add API Endpoint
  4. Add File URL
  5. Add Search and Replace Text
  6. Set Params And Values
  7. Check PDF.co URL Result
  8. Search And Replace Text Output

Step 1: Sample PDF File

In this tutorial, we will show you how you can search and replace specific text in a PDF using PDF.co and Integromat. We will use this PDF document to replace its Company Name.

PDF Source File For PDF.co Search And Replace API
PDF Source File for PDF.co Search and Replace API

 

Step 2: Make an API Call

To get started, let’s create a new scenario and choose PDF.co as our app. Then, select the Make an API Call module. This module will allow us to call any PDF.co Web API endpoints.

Create New Scenario

Step 3: Add API Endpoint

Let’s add the Search and Replace API endpoint v1/pdf/edit/replace-text in the API Endpoint Path field. You can find out more about the API endpoint here.

Insert Replace Text API Endpoint

Step 4: Add File URL

We will enter our source file link directly and so we will choose Set Input URL Param Directly as our Input Type and enter the file URL in the Url field.

Enter The Source URL

Step 5: Add Search and Replace Text

We can now add our search and replace text. Under the Body, click on Add Item and enter the searchString parameter and its corresponding value.

Add Search And Replace Text

Step 6: Params And Values

Once you have added all the items for searchString and replaceString parameters, Run the scenario to see the result.

Items Added In The Body

Step 7: PDF.co URL Result

Great! PDF.co processed our request and returned a URL to view the result. For security purposes, the generated URLs are temporary and are set to expire after an hour by default. We highly recommend that you add another module to store the file permanently.

PDF.co Generated URL

Step 8: Search And Replace Text Output

Here’s the final look of the PDF Invoice. We have successfully replaced the original Your Company Name with XYZ LLC.

 

PDF.co Search And Replace Text API Output
PDF.co Search and Replace Text API Output

 

In this tutorial, you learned how to set up the PDF.co Make an API Call module to use any PDF.co Web API endpoints in Integromat. You also learned how to find and replace text in PDF files using PDF.co and Integromat.