Bookmark from Styles

Overview

Bookmark from Styles creates bookmarks by scanning the PDF for text that matches specific font names and sizes. You define one or more levels, each with its own font criteria and output formatting. The tool walks through the specified page range, finds matching text, and builds a hierarchical bookmark tree.

This is the primary method for automatically generating bookmarks from a well-formatted PDF where headings use consistent fonts and sizes.

Video: Bookmark from Styles shown step by step, with narration.
The Bookmark from Styles dialog
The Bookmark from Styles dialog.
The Add Bookmark Level dialog
The Add Bookmark Level dialog (titled Modify Bookmark Level when you change an existing level).

Tagged PDFs

A text style is only a proxy for structure: “18pt bold” means heading right up until the author changes the template, and it says nothing at all when two different kinds of text share a font. A tagged PDF carries its structure explicitly, so the document itself says which text is a heading and at what level.

The dialog therefore checks for tagging as it opens, and reports what it found on the line at the top:

Note

Cancelling the tagged-content dialog brings you straight back here with everything as you left it, so trying the other route costs nothing.

How to use

  1. Open the PDF you want to bookmark.
  2. Go to Plug-Ins > Bookmarks > Create & Add > Bookmark from Styles.
  3. Set the From page and To page (or choose To end of file) to define the scan range.
  4. Set margin values to restrict the scan area (optional).
  5. Choose a Placement option to say whether the new bookmarks are added at the end of the existing list or inserted in page order.
  6. Select an example heading in the document with the text selection tool, then click Add. The new level takes its font name and size from the selection; adjust them and the threshold in the level dialog if needed.
  7. Set the output formatting for each level: view type, color, bold/italic, and expanded state.
  8. Repeat for additional heading levels as needed.
  9. Click OK to generate the bookmarks.

Page range

OptionDescription
From page The first page to scan (1-based).
To end of file Scans from the start page through to the last page of the document.
To page Scans up to and including this page number.

Level settings

SettingDescription
Font name The exact PDF font name to match, as shown under File > Properties > Fonts (for example Arial-BoldMT), without a subset prefix such as ABCDEF+. To match several fonts, separate the names with colons and no spaces: Arial-BoldMT:Helvetica-Bold. Names are case-sensitive.
Font size The point size to match.
Threshold Allowed deviation from the specified font size. Increase this to accommodate minor size variations in the PDF.
View type The PDF view destination type assigned to the bookmark (e.g. Fit Page, Fit Width).
Color Sets the bookmark text color in the bookmarks panel.
Bold / Italic Sets the bookmark text style.
Expanded When checked, the bookmark node is expanded by default in the bookmarks panel.

Managing levels

ButtonDescription
Add Creates a new level from the text selected in the document: the font name and size come from the selection, the other settings from the level selected in the tree (or the defaults when none is selected). Select an example heading first.
Modify Updates the selected level with new settings.
Remove Deletes the selected level from the list.
Move Up / Move Down Reorders levels in the tree. Levels are processed top to bottom, so the order determines the bookmark hierarchy.

Replacing existing bookmarks

With Keep existing bookmarks cleared you are asked to confirm before the run, and the existing bookmarks are removed only if at least one new bookmark was created; when no text matches the level styles they are kept. A message afterwards says how many bookmarks were created. Margins are measured on the page as displayed (rotated pages included) within the visible crop box. A heading whose parent level has not appeared yet is attached to the nearest level above it (or the top level) rather than to an “UNKNOWN” placeholder. The dialog reopens with the settings you used last.

Placement

Controls where the generated bookmarks are attached to the existing bookmark tree. This only applies while Keep existing bookmarks is checked — with it cleared there are no existing bookmarks to position against, and the options are greyed out.

OptionDescription
Add at the end of the bookmark list Appends every generated top-level bookmark after all existing bookmarks, whatever page it points at. This is the default and matches how earlier versions behaved.
Insert in page order Places each generated top-level bookmark next to the existing bookmark nearest its page, so the list stays in page order. Use this when you have inserted pages into a document that is already bookmarked, or when a range of pages needs a different set of level settings: run the tool over just that page range and the new bookmarks land at their page position instead of at the bottom of the list.

Existing bookmarks that do not point at a page — web links, JavaScript actions, or unresolved named destinations — carry no page position, so they are not used as insertion points and keep their place in the list.

Additional options

OptionDescription
Margins Define left, right, top, and bottom margins to restrict the scan area on each page. Text outside the margins is ignored, so a top or bottom margin keeps running headers, footers and page numbers out of the bookmarks; 0 scans to the edge of the page. Levels whose view is Fit View (Margins) also open scrolled in from the left edge of the page by the left margin.
Units Choose between inches, centimetres, and points for margin input.
Configurations Save and load named configurations using the Configurations box at the bottom of the dialog. Click Save to store the current levels and settings, or select an existing configuration to restore it. To rename a saved configuration, choose it from the list, type the new name over it and click Rename.
Keep existing bookmarks When checked, the current bookmark tree is preserved and new bookmarks are added alongside it. When unchecked, the existing bookmarks are replaced by the new ones once at least one has been created (you are asked to confirm first); if no text matches, they are kept.

Tip

Add reads the font name and size from the text selected in the document, so select an example heading before each click on Add. To open the dialog with the first level already filled in, select a heading and run Bookmark by Example instead.

Tip

Start with the largest heading size (e.g. chapter titles) as Level 1, then add progressively smaller sizes for sub-headings. If headings vary slightly in size, increase the Threshold value to catch near-matches.

Warning

Clearing Keep existing bookmarks replaces all current bookmarks once at least one new bookmark has been created; you are asked to confirm first. This cannot be undone.

See also