Extract PDF pages with bookmarks by reading the destination page number printed next to each outline entry, then typing those one-based page numbers — or inclusive ascending ranges like 3-7 — into a browser-based extractor that copies the chosen pages into a new PDF in the order you typed. Bookmarks themselves are not separate, downloadable objects. They are navigational links stored inside the document that point at coordinates on one or more pages. To extract the pages a bookmark points at, you therefore need to translate each outline entry into the integer page number it targets and feed that list to a page-number-driven extraction tool such as Extract PDF Pages, which reads the original bytes locally with pdf-lib, copies the requested page objects into a fresh PDFDocument, and exposes the result as a downloadable file in your current tab. The selection field accepts comma- or whitespace-separated integers and inclusive ranges such as 1-3, treats each token in the order you typed it as a target page, and refuses to silently reverse a descending range like 5-3.

What Bookmarks Actually Are in a PDF
A PDF bookmark — also called an outline item, a TOC entry, or a "favorite" in some viewers — is a named link. It carries a title, a hierarchy level, an open or closed state, and a destination that tells the viewer where on which page to jump when the reader clicks it. The destination is usually a page reference plus an optional view rectangle or zoom factor so the viewer can frame the right region of the page after the jump. What the bookmark does not carry is a copy of the page content. The actual graphics, text runs, fonts, embedded images, and form widgets live on the referenced page object inside the document's page tree.
This distinction matters for extraction. You cannot select a bookmark as if it were a file, because a bookmark is metadata, not a payload. The pages that bookmarks point to, however, are first-class page objects that any extractor can copy verbatim. The job, then, is to translate each bookmark into the integer page number it points at and feed that list to a tool that works on page numbers.
Reading the Page Numbers Behind Each Bookmark
Before you touch any extraction tool, you need a clean list of one-based page numbers. The fastest way to build that list is to open the PDF in the viewer you trust — Acrobat, Preview, Chrome's built-in viewer, Firefox's PDF.js, or your mobile reader of choice — and click through the bookmark panel one entry at a time. The viewer jumps to the destination page and the page number displayed in the viewer chrome or status bar is the value to record.
For deeper outlines — multi-level tables of contents in technical manuals, legal filings, or textbooks — capture only the level you actually need. If you want chapter starts only, ignore the subsection bookmarks nested underneath. If you want every bookmark target, walk the whole outline. Some viewers let you right-click a bookmark and choose a "Properties" or "Go to destination" command to read the destination page without scrolling through the document; that is often quicker than clicking through long files.
Once the page numbers are in hand, group adjacent targets into ranges to keep the selection field short and readable. If bookmarks point at pages 3, 4, 5, 6, 7, and 12, write them as 3-7, 12 rather than 3, 4, 5, 6, 7, 12. The parser in Extract PDF Pages accepts both forms and treats them identically, and ranges make it easy to spot gaps at a glance.
Pulling the Bookmark Pages Into a New PDF
With your bookmark-to-page-number list ready, the extraction itself is a short, deterministic sequence. The tool runs locally: it validates the file's MIME type and size, loads the bytes with pdf-lib, parses your selection, copies the requested page objects into a fresh PDFDocument, and exposes the result as a temporary download. Nothing leaves your browser.
- Open Extract PDF Pages and pick the local PDF whose bookmarks you want to pull from. The file must be unencrypted, no larger than 50 MiB (52,428,800 bytes), and no longer than 500 pages.
- Type the bookmark page numbers into the selection field. Use one-based integers and inclusive ascending ranges separated by commas or whitespace — for example, 5, 1-3 means original page 5, then pages 1, 2, and 3 in that order.
- Click the extract action. The parser strips duplicate tokens, copies the unique page objects into a new PDFDocument, and reports any duplicate-page notice so you can confirm what was ignored.
- Download the resulting PDF using the temporary link that appears. That link is released when the page closes or when you run another extraction, so save the file immediately rather than reopening the tab later.
- Open the downloaded PDF in your target viewer, verify the page order and content, and keep the original alongside it for comparison.
The parser caps the selection field at 4,000 characters and rejects malformed input rather than guessing. Decimal numbers, negative page numbers, descending ranges such as 5-3, and references beyond the document's last page all raise an explicit error so you can fix the expression before any output is written.
Selection Syntax, Token Order, and Duplicate Handling
Token order is significant in the selection field. The expression "5, 2-3" does not sort itself; it produces a PDF whose first page is original page 5, followed by original pages 2 and 3. If you need a different narrative — say, the bookmark pages in the order they appeared in the original outline — enter them in that sequence and the extractor preserves it verbatim. The table below summarizes how a few common patterns map to the output document.
| Selection pattern | Pages in the new PDF | Notes |
|---|---|---|
| 5 | Original page 5 | A single integer selects one page. |
| 1-3 | Original pages 1, 2, 3 | An inclusive ascending range selects every page between the endpoints. |
| 5, 1-3 | Original page 5, then pages 1, 2, 3 | Token order is preserved, so the range does not jump to the front. |
| 3, 1-3 | Original page 3, then pages 1, 2 | Duplicate of page 3 is ignored; the result reports the repeated number. |
| 5-3 | No output | Descending ranges are rejected with an explicit error rather than reversed. |
Repeated page references follow a deliberate first-occurrence rule. If the bookmark outline points twice at page 3, or you accidentally type "3, 1-3", the output contains page 3 once, followed by pages 1 and 2, and the result explicitly reports the duplicate. This prevents an overlapping range from silently doubling a page in the new file. If you intentionally want duplicates, that is a different job — use a PDF page-reordering or duplication workflow designed for it rather than this extractor.
Limits, Encryption, and What the Tool Will Not Preserve
The input boundaries are concrete and enforced. The browser checks the file's MIME type or extension and measures the actual byte size against a 50 MiB ceiling. A file at exactly 50 MiB is accepted; a larger file is rejected rather than silently shortened. After loading, the decoded document must contain between 1 and 500 pages. Password-protected or encrypted PDFs are not opened by bypassing encryption, so remove any owner or user password in the original authoring software before extracting. Damaged files may fail to load with an explicit error, and dynamic XFA forms are not a supported preservation target in pdf-lib — use the original authoring application if XFA behavior matters. See pdf-lib's encryption handling documentation for the underlying behavior.
Extraction copies page objects — graphics, fonts, images, crop and media boxes, and the 90-degree rotation flag — but several important features live at the document level rather than the page level. Bookmarks, the document outline, page labels, layers, embedded files, AcroForm fields, annotations, scripts, cross-page destinations, and links can all reference objects outside the selected pages and therefore do not always survive cleanly. Digital signatures also become invalid the moment the bytes are reassembled into a different PDF, even if every copied page is identical. Treat these as known consequences of any page-level extraction rather than as bugs, and confirm the output behaves the way you need before relying on it.
Verifying the Output Before You Trust It
Open the new PDF in the viewer your recipient will use. Walk through the pages in order, confirm the count matches the unique pages you selected, and check that any expected links, form fields, or attachments behave correctly. If you extracted a chapter by its bookmark range and then opened the result in Acrobat, for instance, check that internal links still resolve to the new page locations rather than pointing at orphaned destinations. For regulated, signed, or accessibility-driven workflows, hand the output to a specialist PDF editor; this browser tool is intentionally narrow.
Run a quick file-size sanity check as well. The output can be larger than a naive page-count estimate suggests, because each copied page carries the fonts and images it depends on, and resource-heavy documents can pull in surprisingly large amounts of data even for a single page. If the output is dramatically larger than expected, that is a signal to revisit which pages you selected rather than a defect in the extractor. The pdf-lib PDFDocument API powers the underlying copy step, and the output page count always equals the number of unique selected pages regardless of how heavy each page's resources are.
Bookmark Workflows That Go Beyond a Single Output
Sometimes the goal is not one trimmed PDF but a folder of chapter files. A 400-page technical manual with bookmarks for each chapter is a typical example. The same recipe still applies: read each chapter bookmark's target page, then split the input into per-chapter ranges such as 1-22, 23-58, 59-104. You can run Extract PDF Pages once per range to produce a series of single-chapter PDFs, or hand each range to Split PDF if you prefer a dedicated split workflow that produces several files in one pass. The bookmark-reading step is the same in either case.
The same principle generalizes the other way, too. If the PDF has no bookmark outline but you still want a curated set of pages, write down the page numbers the way an outline would have given them to you, then run them through the extractor. Once you internalize the mapping between outline entries and integer page numbers, every bookmark-driven extraction in any toolchain becomes a matter of writing the right list of one-based page references.