Delete PDF Pages API

Our API is 100% free to use – no fees, no subscriptions.

Remove unwanted pages from your PDF documents effortlessly with our API. Specify the pages to delete, and our API generates a clean, updated PDF in seconds. Perfect for refining documents, eliminating errors, or customizing files to your exact needs.


Benefits of our PDF Page Delete API

Quickly remove unwanted pages from your PDFs with our targeted PDF Page Delete API. Eliminate redundant or erroneous content while preserving the overall integrity of your document. This feature allows you to refine and customize your files for clarity and relevance, making it ideal for editing reports, contracts, or presentations, and integrates effortlessly into your workflow.

Read our API documentation to learn how to delete pages from PDFs.

No-Code PDF Page Deletion

Integrate our PDF API with Zapier Webhooks to automate your PDF page deletion workflows effortlessly. Whether you're removing redundant pages from contracts or refining lengthy reports, you can trigger PDF page deletion from hundreds of apps supported by Zapier. Automatically eliminate unwanted pages, resulting in a cleaner, more concise document and saving you time.

Multi-language Code Example

curl -X POST https://apdf.io/api/pdf/page/delete \
  -H "Authorization: Bearer TOKEN" \
  -d file="FILE_URL" \
  -d pages="1-3,z"
const data = new FormData();
data.append('file', 'FILE_URL');
data.append('pages', '1-3,z');

fetch('https://apdf.io/api/pdf/page/delete', {
    headers: {'Authorization': 'Bearer TOKEN'},
    method: 'POST',
    body: data
})
.then(response => response.json())
.then(json => console.log(json));
use GuzzleHttp\Client;

$client = new Client();
$response = $client->post(
    'https://apdf.io/api/pdf/page/delete', [
    'headers' => [
        'Authorization' => 'Bearer TOKEN'
    ],
    'form_params' => [
        'file' => 'FILE_URL',
        'pages' => '1-3,z'
    ]
]);

$body = $response->getBody();
echo json_encode($body->getContents());
require 'rest-client'

response = RestClient.post(
  'https://apdf.io/api/pdf/page/delete',
  {
    'file' => 'FILE_URL',
    'pages' => '1-3,z'
  },
  {
    Authorization: "Bearer TOKEN"
  }
)

puts response.body
import requests

response = requests.post(
    'https://apdf.io/api/pdf/page/delete',
    headers = {
        'Authorization': 'Bearer TOKEN'
    },
    data = {
        'file': 'FILE_URL',
        'pages': '1-3,z'
    }
)

print(response.text)
import (
  "fmt"
  "github.com/go-resty/resty/v2"
)

func main() {
  client := resty.New()
  data := map[string]string{
    "file": "FILE_URL",
    "pages": "1-3,z"
  }

  resp, _ := client.R().
    SetFormData(data).
    SetHeader("Authorization", "Bearer TOKEN").
    Post("https://apdf.io/api/pdf/page/delete")

  fmt.Println(resp.String())
}
import okhttp3.*;

class Pdf {
  public static void main(String[] args) throws Exception {
    OkHttpClient client = new OkHttpClient();
    FormBody formBody = new FormBody.Builder()
      .add("file", "FILE_URL")
      .add("pages", "1-3,z")
      .build();

    Request request = new Request.Builder()
      .url("https://apdf.io/api/pdf/page/delete")
      .addHeader("Authorization", "Bearer TOKEN")
      .post(formBody)
      .build();

    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
  }
}

Start using our API today — no trial needed!
Get Started for Free