docubend

Delete pages from a PDF

Click the pages you want gone.

How it works

  1. Drop your PDF in.
  2. Click the pages to remove.
  3. Download the PDF without them.

What it does

Removing pages is usually about what you do not want to send: the blank sheet the scanner picked up, the internal cover, the appendix that is nobody else's business. Click the pages you want gone and download what is left.

Choosing by thumbnail

Pages are shown as pictures rather than numbers, which matters here more than anywhere else — deleting the wrong page from a contract is a bad afternoon. You can see what you are removing before you remove it, and clicking again puts a page back.

The original is never modified

The file you dropped in is read, not written. A new document is produced with the pages you kept, and the one on your computer is untouched. If you get it wrong, close the tab and start again; there is nothing to undo because nothing was changed.

One thing it will not let you do

You cannot delete every page. A PDF with no pages is not a document that anything can open, so the tool refuses rather than handing you a file that fails silently somewhere else. Keep at least one page, or you wanted the delete key on the file itself.

Doing this from your own code

Remove the page from the model's pages array and PUT the model. There is no delete-pages call.

curl
# fetch the model, change it, put the whole thing back
curl -s https://docubend.com/api/v1/documents/$ID.json \
  -H "Authorization: Bearer $TOKEN" -o model.json

# …edit model.json…

curl -s -X PUT https://docubend.com/api/v1/pdfs/$ID \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"model\": $(cat model.json)}"
JavaScript
const got = await fetch(`${BASE}/api/v1/documents/${id}.json`,
  { headers: { Authorization: `Bearer ${TOKEN}` } });
const model = await got.json();

// …change model.pages…

await fetch(`${BASE}/api/v1/pdfs/${id}`, {
  method: "PUT",
  headers: { Authorization: `Bearer ${TOKEN}`,
             "Content-Type": "application/json" },
  body: JSON.stringify({ model }),
});
Python
model = requests.get(f"{BASE}/api/v1/documents/{id}.json",
    headers={"Authorization": f"Bearer {TOKEN}"}, timeout=60).json()

# …change model["pages"]…

requests.put(f"{BASE}/api/v1/pdfs/{id}",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={"model": model}, timeout=60)

The model is the same JSON the editor works on. Documents reference.

Questions

Can I delete every page?

No. That would produce a file nothing can open, so it is refused.

Is the original file changed?

No. It is read, and a new document is written with the pages you kept.

Can I get a deleted page back?

Within the tool, yes — click it again before you download. Afterwards, start again from your original, which was never modified.

Does removing pages shrink the file?

Usually, and by roughly what those pages were contributing. Removing a photograph saves far more than removing a page of text.

Are the pages I removed still in the file somewhere?

No. The new document is built from the pages you kept, so what you removed is not carried along invisibly.

Next

Tool What it does Runs in Same thing, programmatically
Split a PDF Pull out the pages you want, or make one file per page. your browser GET /api/v1/documents/{id}.pdf
Reorder PDF pages Drag pages into the right order. your browser the document model
Rotate PDF pages Turn sideways pages the right way up, in the file itself. your browser the document model
Merge PDF files Join several PDFs into one, in the order you choose. your browser no endpoint

All 16 tools · API documentation · What an account adds