Bookmarking PDF Documents by Text Pattern
- Introduction
- The AutoBookmark™ software can automatically create multiple-level bookmarks in a PDF document that contains invoices, account statements, reports. The following tutorial is going to show how to take a PDF file with multiple invoices and create hierarchically structured multi-level bookmarks. The “billing” type would be at the first level, and invoice numbers – at the second level. Bookmarks will be arranged by the "billing" type. The resulting bookmark structure provides an effiient way to reveiw and navigate document content.
- Input Document Description
- The input PDF document contains multiple invoices of variable page length. First page of each invoice contains invoice number and one of 3 different labels - COD, CORPCOD and CORPORATE (“billing” type).
- Bookmarking Approach
- Each invoice typically has an invoice number somewhere on the page. We are going to use “Bookmark Text Patterns” function provided by AutoBookmark plug-in to create multiple-level bookmarks based on billing type and invoice numbers. The “billing type” bookmarks are going to be created at the first level, while invoice numbers – at the second level.
- Prerequisites
- You need a copy of Adobe Acrobat Standard or Professional along with AutoBookmark™ plug-in installed on your computer in order to use this tutorial. You can download trial versions of both Adobe Acrobat and AutoBookmark™.
- Step 1 - Open a PDF File
- Start Adobe® Acrobat® application and open a PDF file using “File > Open…” menu.
- Step 2 - Open “Bookmark Text Patterns” Dialog
- Use “Plug-ins > Bookmarks > Bookmark Text Patterns…” menu to open “Bookmark Text Patterns” dialog.
- Step 3 - Add First Bookmark Level Settings
- Press “Add Level…” button to create description of the first bookmark level. “Bookmark Level Settings" dialog is going to appear on the screen.
- Step 4 - Configure Bookmark Level Settings
- Specify text pattern by entering “COD|CORPCOD|CORPORATE” as a regular expression for the first bookmark level. This text pattern will bookmark any page that contains any of these labels: “COD”, “CORPCOD”, “CORPORATE” .
- Click “OK” button once done.
- Click “OK” button once done.
- Step 5 - Add Second Bookmark Level Settings
- Press “Add Level…” button to enter a description of the second bookmark level. “Bookmark Level Settings" dialog is going to appear on the screen.
- Step 6 - Configure Bookmark Level Settings
- Specify text pattern by entering “Invoice Number: \d+” as a regular expression for this bookmark level. All occurrences of “Invoice Number: XXXXXXX” (where XXXXXX is a number) will be bookmarked by this text pattern.
- Click “OK” button once done.
- Step 7 - Start Bookmarking Process
- Now you should see 2 entries in the "Bookmark Levels Settings" box. One for each bookmark level.
- Optionally Press “Save To File…” button to save bookmarking settings into a settings file (*.abmp extension). You can load and reuse settings from this file later.
- Click ‘OK” button to start bookmarking process.
- Step 8 - Examine the Results
- The number of bookmarks created will be reported at the end of the procedure.
- Click “OK” to inspect the results.
- Step 9 - Inspecting the Results
- The AutoBookmark™ plug-in automatically creates 2-level bookmarks for each invoice page: 1st level – “billing” type; 2nd level – invoice number. Thus, in certain cases the bookmarks are duplicated. Now we need to merge duplicated bookmarks.
- Step 10 - Open “Merge Duplicate Bookmark Titles” Dialog
- Select “Plug-ins > Bookmarks > Merge Duplicate Titles…” from a menu to open “Merge Duplicate Bookmark Titles” dialog.
- Step 11 - Configure Merging Duplicate Bookmarks Settings
- Define starting and ending bookmark level to be merged.
- Enter “1” in “Starting bookmark level” box. Enter “2” in “Ending bookmark level” box.
- Click “OK” to start the process.
- Step 12 - Inspecting the Results
- The AutoBookmark™ plug-in has automatically combined multiple bookmarks with the same title into a single bookmark. If bookmarks had child bookmarks, then they were consolidated under unified "parent" bookmark. Now this document has 2 bookmark levels and all bookmarks are arranged by the "billing" type (1st level – “billing” type; 2nd level – invoice number, that points at the first page of each invoice).