Note: Are you a developer? Check out our docs here to use API directly from your app or through other 300+ integrations here.

Step by step guide:

1. 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.

Source file

Screenshot of Source PDF

2. On Zapier action step, 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.

App & Event

3. Now let’s 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"
}

Setup action

4. It’s time to send our custom API call to PDF.co for Test & Review.

Test action

5. 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.

Test success

6. Great! We have successfully deleted pages 1 and 2 from the PDF document.

Output result

Screenshot of Ouput PDF

Note: Are you a developer? Check out our docs here to use API directly from your app or through other 300+ integrations here.

Related Pages: