Note: Are you a developer? Check out our docs here to use API directly from your app or through other 300+ integrations here.
In this tutorial, we will show you how to delete pages from a PDF document. Our source PDF file contains 4 pages. Using PDF.co’s Custom API Call, we will delete pages 1 to 2 and the remaining pages 3 to 4 will be the output PDF file.
- Set Up Zapier Action with PDF.co Custom API Call
- Configure the Custom API Call
- Test & Review
- Copy & Paste URL to Browser to View Output
Screenshot of Source PDF
1. Set Up Zapier Action with PDF.co Custom API Call
Select PDF.co as the App and Custom API Call as the Action Event. The Custom API Call is designed for advanced users. This allows them to call PDF.co API’s other endpoints that are not listed in the current Action Events.
2. Configure the Custom API Call
- In the PDF.co API Endpoint field, select v1/pdf/edit/delete-pages so we can delete the pages.
- In the Input JSON field, enter the URL, page number or range, and the name of your desired output file with the extension .pdf. Below is the JSON code that you can copy and replace with your own data. Click here to view the PDF.co API docs
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"pages":"1-2",
"name":"result.pdf"
}
3. Test & Review
It’s time to send our custom API call to PDF.co for Test & Review.
4. Copy & Paste URL to Browser to View Output
The Test & Review was successful. PDF.co returned a temporary URL that is only accessible for an hour. Kindly copy and paste the URL on your browser to see the result.
Great! We have successfully deleted pages 1 and 2 from the PDF document.
Screenshot of Ouput PDF
You can set up the next step to save the generated file in Google Drive or Dropbox depending on your requirement.
Note: Are you a developer? Check out our docs here to use API directly from your app or through other 300+ integrations here.