Setting Acrobat Bookmarks for a Book

When you save a FrameMaker book to PDF, you are presented with the PDF Setup dialog box, where you can set which paragraphs (or elements) you want to appear as bookmarks in the PDF. Often, you will set the Include formats and levels just how you want them, but when you make the PDF, one or more paragraphs will be included that you didn’t specify. In fact, these paragraphs won’t show up in the Include/Don’t Include lists in the PDF Setup dialog box. Scott Prentice, in a recent post, gives the reason behind this:

In my testing, I believe that the key factors are that the first file in the book needs to have definitions for all of the para styles in the book, and you have to set the include/exclude values on that file. If it’s a binary file, these settings would be made there … if it’s structured, you’d need to make those settings in the template that’s applied to that component.

Let me make this clearer with a couple of screenshots. First, here is the PDF Setup dialog box after I selected all of the files in the book and chose Format > Documents > PDF Setup.

PDF Setup Dialog

So far so good. But when I create the PDF file, I get bookmarks to some paragraphs in the TOC. When I look for the paragraphs in the PDF Setup dialog box for the book, they don’t appear in either of the Include/Don’t Include lists.

If I select the TOC component in the book and choose Format > Documents > PDF Setup, I discover the source of the problem, as illustrated in the following screenshot:

PDF Setup of TOC

You can see that there are two extra paragraph formats in my Include list: title.0TOC and title.0.frontmatterTOC. Because these formats don’t exist in the first component in the book, they don’t show up in the Include/Don’t Include lists when I display the PDF Setup dialog box for the book.

There are three possible solutions to the problem:

  1. Make sure all of the paragraph formats from all of your book’s components exist in the first component of the book. Then they will all be available in the book’s PDF Setup dialog box so you can move them to the appropriate Include/Don’t Include list.
  2. Check each book components PDF Setup dialog box individually and make sure the Include list only contains the formats you want. In the above example, I moved the two TOC paragraphs to the Don’t Include list, and everything worked fine. However, I was fortunate because only the TOC contained the extra formats. For  some books, you may have to check more of the components.
  3. Use FrameScript or the FDK to quickly set up the bookmarks for each of the book’s components.

I have a free FrameScript script for doing this. It uses an INI file to determine which paragraph formats to include for bookmarks; here is an example:

; paragraph format name=bookmark level

Any paragraph format not specified will have its bookmark level set to 0 (zero), and will not appear in the PDF. Since the script processes all of the components in the book, you don’t have to worry about having all of the formats in the book’s first component. You can download the script here. Please let me know if you have any questions or comments.


3 thoughts on “Setting Acrobat Bookmarks for a Book”

  1. This script works great. We have had issues where FrameMaker 8 would “forget” our bookmark settings if we added a new file to our books. Frame 10 appears to forget it every time. We also have a problem when using Save as PDF that if the Generate tagged PDF is checked, sometimes Acrobat distiller produces a flushing error and no PDF is produced. Is there a line of code we can drop into the script to turn off this setting?

  2. David, add a new line after line 47 in the script, and add this content:

    Set oDoc.PDFStructure = False;

    Save the script and you should be all set.

Leave a Reply

Your email address will not be published. Required fields are marked *