Boneyard Tools

How PDF page order actually works

How a PDF stores page order, why reordering does not re-render your content, and how the drag grid maps to the final file.

A PDF is a list of page objects

Inside a PDF, every page is a self-contained object holding its own text, fonts, images and vector drawings. A separate structure called the page tree records the sequence those objects appear in when you open the file. Reordering pages does not touch the pages themselves, it only rewrites the sequence in that tree. That is why moving page four to the front is fast and lossless: nothing inside a page is redrawn, only the running order changes.

Why this tool builds a new file

Rather than edit the original in place, the tool copies each page you selected into a brand new document in your chosen order using pdf-lib. Copying preserves the exact bytes of each page's content stream, so selectable text stays selectable and images keep their resolution. The new file is handed straight to your browser as a download with a -reordered suffix, and your source file is never modified. Because the copy happens in memory on your device, no page ever travels to a server.

From the drag grid to the download

The preview grid shows one thumbnail per page, each carrying a badge for its current position and a tag for the page it originally was. When you drag a thumbnail, the tool splices it out of the order array and inserts it at the drop position, exactly as the final file will read. On download it converts those one-based positions to the zero-based indices pdf-lib expects and extracts the pages in that sequence. What you see in the grid is precisely what you get in the saved PDF.

The text fallback and missing pages

Not every PDF can be rasterized to previews in the browser, so the tool offers a text box where you type the order as page numbers. The parser ignores anything that is not a valid page number and skips duplicates, keeping only the first mention of each page. Crucially, any page you never mention is added at the end in its original ascending order, so the result is always a full set with no page lost. This makes a partial list like 3, 1 a safe shorthand for 'these first, then everything else as before'.

Frequently asked questions

Does reordering change my file size much?

Usually not. The same page content is copied into the new file, so the size stays close to the original, give or take small structural overhead. Nothing is compressed or re-encoded during the reorder.

Can I remove a page by leaving it out of the text order?

No. Unlisted pages are appended at the end rather than deleted, so this tool never drops a page. To delete pages, use an extract or delete pages tool instead.