Loading Techie Utils…

PDF Table of Contents Generator

Build a contents page from the bookmarks. Free, and runs entirely in your browser — nothing you enter is uploaded, stored or sent to a server.

About Table of Contents

Builds a real contents page from the document's bookmarks and puts it at the front: the titles, dot leaders, the page numbers, and a clickable link on every line.

The page numbers are the ones the finished document will have. Inserting two contents pages at the front moves every page in the document along by two, so the entry that used to say 38 has to say 40 — and a tool that prints the old numbers produces a contents page that is wrong on every line. That arithmetic is done here, which is the main reason this exists rather than being a copy-and-paste job.

It is built from bookmarks because bookmarks are the only structure a PDF reliably has. If a document has none, the Bookmarks tool will give it one — from there, this is one click.

Where it helps

  • Numbers the entries against the document as it will be, not as it was.
  • Clickable links on every line, made after the pages have moved.
  • Dot leaders drawn as text, so they print as dots rather than as a rule.
  • Nested entries are indented and top-level ones set in bold, which is what makes a contents page scannable.
  • Runs on as many pages as the outline needs, and says how many it used.
  • The document stays in your browser.

Limits

  • Built from bookmarks only — a document without them needs the Bookmarks tool first.
  • The contents always go at the front; there is no option to place them after a cover.
  • Standard PDF fonts are Latin-1 only, so a title outside that repertoire will be substituted.
  • Running it twice adds a second contents page rather than replacing the first.
  • Page numbers shown are positions in the file, not page labels, so a document with roman front matter will not match its own numbering.

Frequently asked questions

Why does it need bookmarks?

Because a PDF has no headings — only text that happens to be larger. Bookmarks are the one place a document states its own structure, so they are the only reliable source for a contents page. Add them with the Bookmarks tool and run this after.

Are the page numbers right?

Yes, and that is the part worth checking in other tools: the contents pages themselves shift everything along, so each printed number is the original page plus the number of contents pages inserted.

Can I put the contents after the cover?

Not directly. Split the cover off, build the contents on the rest, and merge the cover back on — the page numbers will then be one short, so it is worth adding the cover first instead.

What happens if I run it twice?

You get two contents pages. Remove the first with Delete Pages before rebuilding, or work from the original.

Related tools

More Images & Files tools