Other PDF Issues

How to Automatically Create PDF Bookmarks from Colored Separator Pages

John WilsonJohn Wilson Nov 5, 2026 869 views

Question details

The user wants to automatically create bookmarks in a scanned PDF based on the presence of colored separator pages (such as green sheets).

How to Automatically Create PDF Bookmarks from Colored Separator Pages
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Scanning large document batches using colored separator sheets to divide sections, and wanting to automate the bookmarking process for each new section.
Observed behavior
Adobe Acrobat scripting does not have native access to analyze page colors or raster image graphics, making direct color-based bookmark automation impossible without custom tools.
Before you start

Check if your colored separator pages contain any standardized, unique text (like 'Section Break' or 'New Chapter'), as text-based bookmark generation is much easier to automate.

Solution 1Recommended

Use Acrobat JavaScript to Detect Unique Text Instead of Color

Since Acrobat cannot detect color via scripting, utilizing unique text printed on the separator pages is the most practical workaround for automating bookmark creation.

The Acrobat scripting model lacks access to the graphics or color profiles of a scanned raster image. However, it excels at finding words and text.

By ensuring your colored separator pages have a unique text identifier printed on them prior to scanning, you can use a JavaScript snippet to search for that text and automatically build your bookmarks.

1
Open your scanned PDF

Launch Adobe Acrobat and open the scanned PDF document containing your separator pages.

2
Run Text Recognition (OCR)

Go to the 'Scan & OCR' tool and recognize the text in the document so that the unique text on the separator pages becomes searchable.

3
Open the JavaScript Console

Navigate to Tools > Action Wizard or use the JavaScript Debugger console to input a custom script.

4
Execute the Bookmarking Script

Write and run a script that loops through the document's pages (numPages), searches for the unique separator string (using getPageNumWords and getPageNthWord), and creates a new bookmark when the text is found.

Alternative Automation: This method completely bypasses the limitation of color detection by relying on highly reliable OCR text matching.

Efficiently Create and Manage PDF Bookmarks with WPS Office

While automated color-based bookmarking requires advanced external scripting, WPS Office provides an intuitive, lightweight PDF editor that allows you to rapidly navigate and manually add bookmarks to your scanned documents without complex setups.

  1. 1. Open your PDF in WPS Office: Launch WPS Office and open your scanned PDF document.
  2. 2. Open the Navigation Pane: Click the 'Bookmark' or 'Thumbnail' icon on the left-hand sidebar to view your document structure.
  3. 3. Locate Separator Pages: Scroll through the page thumbnails. The colored separator pages will be visually distinct and easy to spot.
  4. 4. Add a Bookmark: Right-click the colored page or click the '+' icon in the Bookmark pane to instantly create a new bookmark.
  5. 5. Organize and Rename: Type the name of the new section for your bookmark and drag it to organize your document hierarchy.
Quickly add, edit, and manage PDF bookmarks in an intuitive interfaceHighly compatible with Adobe PDF formats and scanned documentsSmooth thumbnail navigation to easily spot colored separator pages manuallyFree and lightweight PDF editing alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why can't Adobe Acrobat natively detect colored pages for bookmarking?

Adobe Acrobat's built-in JavaScript scripting model does not have direct access to analyze graphics, background colors, or the pixel data of raster images in scanned PDFs. It is primarily designed to interact with text, form fields, and document metadata.

Can a custom plug-in detect colored separator pages in a PDF?

Yes. While JavaScript is limited, a custom Acrobat plug-in developed using the Acrobat SDK (in C/C++) has deeper access to the page content and rendering engine, allowing it to potentially analyze raster images for specific color profiles.

What is the best alternative to color-based PDF bookmarking?

The most reliable alternative is to print unique, standardized text (e.g., 'Section Divider') on your colored separator pages before scanning. You can then run OCR and use a simple script to find that exact text and automatically generate bookmarks.