Drag and drop to move pages around in your PDF document.
In the PDF specification, the document structure is governed by a Pages Dictionary (the root of the page tree). This tree contains an array called /Kids, which holds references to every page in the document in strict sequential order.
When you move Page 50 to position 2 using this tool, we don't have to copy or rewrite the heavy graphics, fonts, or images of Page 50.
Instead, we simply pluck the object reference for Page 50 out of the /Kids array, and insert it at index 1 (the second position). When the file is saved, the PDF viewer reads the new array order and displays the pages accordingly. This makes moving pages an extremely fast, lightweight operation.
Because manipulating the /Kids array requires only editing the document's cross-reference table and dictionary objects, we can perform this operation entirely in your browser using WebAssembly.
There is no need to upload your sensitive document to a server, and the processing is nearly instantaneous, even for massive 1,000-page books.
What PDF structure determines the order in which pages are displayed?