Searching...
No tools found

How to Delete PDF Pages Without Breaking Bookmarks

PDF··7 min read

Deleting a page is easy. Keeping the bookmarks and internal links working is the part every tool skips — and a naive delete leaves the page you removed sitting inside the file. Here are the numbers from two real documents.

Deleting a page from a PDF looks like a solved problem. Drop the file in, click the pages you do not want, download. What none of those tools tell you is that the document you get back is a new document assembled from the pages you kept, and that the navigation you never noticed — the bookmark panel, the table-of-contents links on page one — lives outside those pages. It does not come along.

This page is about that, because it is the part that costs people a second attempt. Smallpdf, one of the largest names in the category, answers the question directly in its own FAQ: "Will my page numbers, links, and bookmarks still work after deleting pages?" — "Not always. Internal links pointing at a removed page will break, and cross-references to page numbers may now be wrong, so walk through the document and check everything before you save." That is an honest answer, and it is also the whole of the help you get. Below is what is actually happening, what to check before you export, and the numbers from two real documents.

What "deleting a page" actually does

A PDF is not a stack of pages with an index at the front. It is a bag of numbered objects, and the pages are objects that a tree points at. Two of the things that point at a page object are invisible in every viewer until they break:

  • Bookmarks live in the document outline, a tree of items each carrying a destination. The destination is not "page 4" — it is a reference to the page object itself.
  • Internal links are link annotations with the same kind of destination: a reference to a page object, usually with a zoom position attached.

So removing a page in the browser is done the only way a browser can do it: create a new document, copy the page objects you want to keep into it in the order you want them, save. The pages survive because they were copied. The outline and the link destinations were never copied, because they are not part of a page — they are part of the document. The new document has no outline at all, and its links still name page objects from the old file.

The part that surprised me: the deleted page stays in the file

I expected the failure to be "the bookmarks disappear". It is worse than that, and it is measurable.

Take an 81,338-byte, sixty-page document with a four-chapter outline and a link on page 1 pointing at page 60. Delete page 60 and copy the other 59 pages, the way a page organiser does it by default, and the output is 71,311 bytes across 125 objects — and page 60 is still in there. Its text is still in the file. The reason is that the copier follows the link's destination reference and dutifully copies the page it points at, as an extra object that is not in the page tree. Nothing displays it. No page count counts it. But the bytes are there, the file is bigger than it should be, and the link on page 1 now points at a page no viewer can navigate to.

Cut the link destinations before copying — which is what the delete-pages tool does — and the same job comes out at 70,131 bytes across 123 objects, with page 60 gone and the link removed instead of left dangling. That is 1,180 bytes and two objects of a page that was supposed to have been deleted, on a document where exactly one page carried a link. On a file where every page has a "back to contents" link, the gap grows with the page count.

The check to run before you export

Because the outline is read before anything is copied, the counts can be shown while you are still deciding. Open the six-page report and the panel says 6 bookmarks in the document — all kept and 1 internal link — all still point at the right page. Mark pages 2 and 4 for removal and it changes to 4 kept, 2 removed because the page they point at is gone, and 1 remapped, 0 removed.

Those two numbers are the whole point. "2 removed" is telling you that the bookmark called "Scope of this report" pointed at the page you just deleted and there is nothing left for it to point at. You can put the page back, or accept it. What you cannot do is export and find out later.

Step by step

  1. Add the PDF. Every page appears as a card with a preview. Previews render as you scroll, not all at once — a 60-page document built its grid in 603 ms with 15 of the 60 thumbnails rasterised on open.
  2. Click Remove on the pages you do not want. The card dims and is labelled Removed but stays where it is, so Undo can put it back in the same position. Nothing is renumbered until you save, and the badge on each card shows the position that page will have in the output.
  3. Reorder and rotate on the same screen. Drag a card, or use its arrows — those work on a touch screen and by keyboard, which dragging does not. The rotate buttons add to the page's own angle rather than replacing it, so a scan that already carries a 90° rotation turns to 180° instead of snapping back to upright.
  4. Read the bookmark and link counts. This is the step every other tool does not have.
  5. Save. The file is rebuilt in the browser. The sixty-page job, with two pages deleted, took 282 ms to save.

What it does not do

Worth stating plainly, because a page organiser that quietly gets one of these wrong is worse than one that says so.

  • It does not renumber printed page numbers. If page 3 of the document has "Page 3" printed in its footer and you delete page 2, the page now in third position still says "Page 3" — and so does the page before it. Fixing that means editing the text on every page, which is a different job from reordering them.
  • It does not rewrite cross-references in the body text. A sentence reading "see page 12" is text, not a link. If page 12 is now page 11, the sentence is wrong and the tool cannot know it.
  • It repoints bookmarks with a fit-to-page view. A bookmark that used to land on a specific heading lands at the top of the right page. Preserving the original zoom coordinates would carry positions that belong to a layout the reader may no longer be looking at.
  • It refuses password-protected files by name rather than failing silently, and it refuses to produce a zero-page PDF.
  • It does not shrink a file in proportion to the pages removed. Fonts, images and shared resources are stored once and the surviving pages still use them.

Two real files, measured

DocumentInOutBookmarksLinks
Six-page report, page 2 and page 4 deleted, last page moved to the front6 pages
7,736 B
4 pages
4,255 B
6 → 4
the two pointing at deleted pages removed
1 → 1
repointed from page 2 to page 4
Sixty-page document, pages 1 and 60 deleted60 pages
81,338 B
58 pages
69,136 B
6 → 6
"Chapter One" retargeted to its first surviving section
1 → 0
its target page was deleted

Both outputs were checked with qpdf --check and reported no syntax or stream encoding errors, and the outlines were read back out of the produced files with an independent reader rather than from the tool's own report. In the four-page result the bookmarks point at pages 2, 3, 4 and 1 — which is where those chapters actually are after the move, not where they were in the source.

If you want to see the counts on your own document before committing to anything, delete pages from a PDF in the browser — the file is opened, edited and rebuilt on your machine, and the bookmark panel tells you what will survive before you save it.

Written by the Chaudify team. Every tool mentioned here runs entirely in your browser — nothing you open is ever uploaded. Browse all tools or read more guides.