← All posts

What reordering PDF pages quietly breaks

You have a 180-page manual with a proper outline down the side, and the appendix is in the wrong place. Moving it is thirty seconds of work. What you cannot find out anywhere is what else moves with it.

Or you have already done it. The pages are in the right order now, and the bookmark panel is empty.

The honest answer is that it depends entirely on your tool, and not on how good the tool is. There are two completely different ways to put a page somewhere else, and which one you used decides everything you have just lost.

A bookmark points at a page, not at a page number

This is the fact the whole question turns on. An outline entry does not store "page 7". It stores a destination: a reference to a page object, plus how to position it once you arrive.

So through a genuine reorder, a bookmark cannot end up wrong. Move chapter four to the front and its entry opens page 1, because the entry never knew it was page 7 in the first place. Nothing needs remapping and nothing needs checking. Internal links behave the same way, and so does anything else that names a page rather than a number.

The catch is that most tools do not move your pages at all. They build a new document and copy the pages into it, and a copy is a different object. The old destinations point at the pages of the old file, which is not the file you now have. (If you are here because a merge emptied the panel, that has its own set of causes, including the one where the bookmarks survive and all land on page 1.)

What a rebuild leaves behind, and why

Our Organize PDF pages rebuilds. It is worth saying why, because it is not laziness: the tool lets you write a page twice to duplicate it, and two entries in one page tree pointing at one page object is a file that viewers render and other tools mangle. Copying into a fresh document keeps that honest.

The consequence is mechanical. Some things in a PDF belong to a page, and some belong to the document — they hang off the catalogue, the object that represents the file as a whole. Copy pages into an empty document and you take the first group and leave the second.

Carried over, because they live on the page: the content and its fonts and images, the page's rotation, and its annotations — comments, highlights, stamps, ink, and the widgets that draw a form field's answer. Your review notes travel with the page they were written on.

Left behind, because they live on the document: the outline, the named destinations, the AcroForm that makes a form a form, the structure tree that makes the file accessible, and the page label table that tells a reader to display "iv" rather than "4".

Two of those are worth spelling out. A filled-in form comes back looking untouched — the boxes are still there, the answers are still visible — but the document no longer has a form in it, which is the same loss, for the same reason, as when you pull a range of pages out into a new file. And an internal link survives as an object on the page while its destination still names a page of the old document, so it points at something that is not one of your pages any more. It does nothing when clicked.

Check what you lost in five seconds

Run the file through our PDF inspector before and after. It works in the browser and nothing is uploaded. Two lines answer this question: Form fields goes from a count to "None", and Tagged goes from yes to no.

It does not report bookmarks, so for those, open the sidebar by hand. Worth doing before you panic: a PDF can ask a reader to open with the panel showing, and if it does not ask, most readers open with it closed.

The order that costs least

If the document is a filled form, or has an outline you care about, do the work in this order.

  1. Flatten first, if there are answers to keep. Flatten PDF presses each field's appearance into the page and removes the field, so the answers become ordinary page content that survives any later rebuild. Do it the other way round and there is no form left for flatten to find.
  2. Reorder. Write the order you want — 3,1,2, or 7,1-6,8- to move page seven to the front of a document whose length you have not counted.
  3. Rebuild the outline last, with Create PDF bookmarks, from the headings, a pattern, or one entry per page. The merge post sets out how to get a good result from each of those.

The two routes that actually move the pages

If the outline matters more than the convenience, use something that edits the page tree in place instead of building a new file.

Our PDF editor. Its page manager reorders, rotates, deletes and duplicates inside the document you uploaded, so everything the page list does not mention — outline, named destinations, form definition, structure tree — survives untouched, and every bookmark follows its page to wherever you put it. Three things to know: an entry pointing at a page you deleted now has nowhere to go; a duplicated page is a new object, so no bookmark points at the copy; and page labels are keyed to positions rather than to pages, so the sheet you moved to the front takes on the label that position had.

qpdf, which is free, installs on every platform and never uploads anything:

qpdf in.pdf --pages . 4,1-3 -- out.pdf

The full stop is the whole trick. It means "this same file", so qpdf keeps your document and rearranges its pages: outline intact, each entry following its page, links still landing correctly, the tagged structure and the page labels carried across with the sheets they belong to. Write --empty in its place — as most examples on the internet do — and you get a fresh document with your pages copied into it, no outline and no structure tree, exactly like the browser tools. Same program, same page list, different result.

What none of this can fix

The numbers printed on the paper do not move. They are ink, drawn into the page like any other word, and after a shuffle they say whatever they always said — three different numbers, and only one of them is real. Any sentence in the text saying "see page 12" is wrong now too, and nothing detects that.

The panel keeps its own order. Bookmarks that survive a reorder stay listed in the order they were written, so an outline that reads Chapter 1, 2, 3, 4 can now open pages 2, 3, 4 and 1. Correct, and confusing to read. If you have moved whole chapters about, rebuild the outline anyway.

A digital signature does not survive, by either route. It covers the exact bytes that were signed, and both moving pages and rebuilding write new ones.

Every other page operation costs the same thing. Extract PDF pages, split and delete all produce a new document from copied pages, so the outline, the form and the tagging go for the reason set out above. This is not five separate bugs to route around. It is one rule: page work first, then everything you want to sit on top of it.