Creating PDF Bookmarks to Pages Before or After a Page with a Specific Text
- Introduction
- This tutorial shows how to automatically bookmark pages before or after a page with a specific text using the AutoBookmark™ plug-in for the Adobe® Acrobat®. It is often necessary to bookmark a specific location in the PDF document, but the only way to automatically identify the location is some "signature" text that is located on a different page. This is where the "Bookmark Words From List" operation comes handy.
- Tutorial Overview
- In this tutorial we are going to show how to create a PDF bookmark to a page after the page that contains the "Trademarks and Copyrights" text.
- Next, we will show how to bookmark a page before the page with the "Legal Notice" text string. Similarly, bookmarks with any page offset can be created.
- Prerequisites
- You need a copy of the Adobe® Acrobat® along with the AutoBookmark™ plug-in installed on your computer in order to use this tutorial. You can download trial versions of both the Adobe® Acrobat® and the AutoBookmark™ plug-in.
- Step 1 - Open the "Bookmarks Words From List" Dialog
- Start the Adobe® Acrobat® application. Open a PDF document to be processed.
- Select "Plug-Ins > Bookmarks > Bookmark Words From List..." from the menu to open the "Bookmark Words From List" dialog.
- Step 2 - Configure Settings
- The software provides a keyword for specifying a page offset for a specific bookmark. For example, use the following syntax to bookmark the next page after a page with "Trademarks and Copyrights" text:
-
Trademarks and Copyrights;Offset:1
- Use -1 for the offset parameters to specify a page before a page with a specific search text:
- Legal Notice;Offset:-1
- Check the "Use search keywords and options" box to turn on support for special keywords. If this option is ON, then a number of special keywords can be used to control the text search. Otherwise, search terms are used "as-is".
- Click "OK" to start bookmarking.
- Step 3 - Inspect the Results
- Click "OK" to finish.
- Check the bookmarks that have been generated. The "Trademarks and Copyrights" bookmark point to page 11, while the corresponding text is located on page 10. The "Legal Notice" bookmark points to page 11, while the corresponding text is located on page 12.
- Advanced Keywords
- The following keywords are available for controling the fine-details of the bookmarking process:
-
- Controling Page Ranges: The matching text is only going to be bookmarked if it occurs within the specified page range. For example, to bookmark "John Doe" text string only if it occurs on pages 1 through 5, type the following text: "John Doe;p:1,5", or "John Doe;P:1,5", or "John Doe;Pages:1,5".
- Specifying Bookmark Level: To specify a bookmark nesting level, add any of the following keywords after a semicolon: "n:K", "N:K", "Nesting:K", where K is a number that designates a desired nesting level for the bookmark created from this search term. For example: "Contract;n:2".
- Bookmark Uniqueness: To specify that a given search term is only allowed to produce unique bookmark titles, use "o", "O", "Once" keywords. For example, to specify that "Box" text is only allowed to create unique bookmark titles use the following syntax: "Box;o". Using this option will prevent software from creating multiple bookmarks with the same title.
- Optional matching condition: Bookmark can be created only if a specific text is also present somewhere on the page. This feature can be used to match page labels when trying to bookmark entries from a table contents. To specify a label match option use "l", "L", or "Label" keywords. For example, the following search terms "Introduction;Label:A-211" means that "Introduction" is going to be bookmarked only if there is "A-211" text present on the same page.
- Using regular expressions to establish additional matching conditions. Regular expression syntax can be used to establish additional matching conditions for a specific search term. This option is similar to label matching (see above), but is using a regular expression syntax instead of a simple text match. Use "r", "R", or "Regex" keywords to specify a regular expression filter. For example, a regular expression can be used to ensure that a specific text is not present on the same page: "Terms and Conditions;Regex:!Draft Copy". This search term only bookmarks "Terms and Conditions", if the "Draft Copy" text is not present on the same page (exlamation mark is used to negate a regular expression). Another example: "Terms and conditions;Regex:\d{4}-\d{5}". In this case the bookmark would be created only if the page contains "XXXX-XXXXX" number pattern (i.e 1234-98751, or 8576-00002).
- Click here for a list of all step-by-step tutorials available.