This tutorial will guide you through the process of finding and replacing text in PDFs using PDF.co and Make. Here are the steps:
- Sample PDF File
- Make an API Call
- Add API Endpoint
- Add File URL
- Add Search and Replace Text
- Set Params And Values
- Check PDF.co URL Result
- Search And Replace Text Output
Step 1: Sample PDF File
For teaching purposes, we will use the PDF document below and replace its Company Name. By following the step-by-step process, you will learn how to search and replace specific text in a PDF using PDF.co and Make.
Step 2: Make an API Call
With the sample PDF document in place, we will begin by creating a scenario. We will select PDF.co as our app then we will choose the Make an API Call module. This will enable us to call any PDF.co Web API endpoints.
Step 3: Add API Endpoint
In the API Endpoint Path field, we will add the Search and Replace API endpoint v1/pdf/edit/replace-text. To learn more about the API endpoint, click here.
Step 4: Add File URL
Step 5: Add Search and Replace Text
Now, it’s time to add search and replace text. We will click on Add Item under the Body, then we will input the searchString parameter and its corresponding value.
Step 6: Params And Values
After entering all the items needed for searchString and replaceString parameters, we are ready to Run the scenario to obtain a result.
Step 7: PDF.co URL Result
PDF.co has now processed our request and generated a URL so we can see the result. However, to maintain system security the URL is just temporary and will automatically expire after one hour. To store the file permanently, we strongly recommend that you add another module.
Step 8: Search And Replace Text Output
As you can see now in the final output, we successfully replaced the original Your Company Name with XYZ LLC in this PDF Invoice.
Congratulations! You just learned how to set up the PDF.co Make an API Call module to use any PDF.co Web API endpoints in Make. You also observed, and perhaps followed the entire process of finding and replacing text in PDF files using PDF.co and Make.