In this tutorial, we will show you how to delete pages from PDF using PDF.co and Make. We will use the sample PDF with four pages and delete pages 1-2.

  1. PDF.co Module and Make an API Call
  2. Make an API Call Configuration
  3. Run Scenario Result
  4. Output
Sample Source PDF
Sample Source PDF

Let’s start by logging in to your Make account and creating a new scenario.

Step 1: PDF.co Module and Make an API Call

First, add the PDF.co module and select the Make an API Call.

PDF.co Module And Make An API Call

Step 2: Make an API Call Configuration

Let’s set up the configuration.

  • For the PDF.co API Endpoint Path field, type in /v1/pdf/edit/delete-pages endpoint.
  • For the Input Type field, you can choose either Upload files and inject as ‘url’ param or override ‘url’ param with value as an input.
  • Then, enter the direct URL of your source file.
  • Type in your desired PDF Output File Name.
  • Under the Body param, type pages for the Key and put the number of pages you’d like to delete in the Value. Make an API Call Configuration
    Make an API Call Configuration

After setting up the configuration, you may now run the scenario.

Step 4: Run Scenario Result

Excellent! The scenario runs successfully. You can copy the URL and paste it into your browser to view the output.

Run Scenario Result

Step 5: Output

Here’s the output that we successfully deleted pages 1 and 2.

 

 

Source File Output
Source File Output

In this tutorial, you learned how to delete pages from PDF using PDF.co and Make. You learned how to use the /v1/pdf/edit/delete-pages endpoint to delete pages. You also learned how to use the PDF.co Web API to delete the number of pages in a PDF document.

Related Pages:

Related Samples: