PDF Hyperlinks & Bookmarks
In a PDF, hyperlinks are not part of the text stream. They are defined as interactive /Annot dictionaries of subtype /Link superimposed over a specific set of coordinates on the page.
Similarly, the Table of Contents (Bookmarks) is stored in a separate /Outlines dictionary. These files test your parser's ability to identify both external URL references for security scanning, and internal anchor links for UI navigation.
External hyperlinks
A document packed with external URLs, perfect for testing security scanners and link-extraction tools.
Internal hyperlinks
A document containing internal links that jump between pages, testing `/GoTo` actions.
Bookmarks Outline
A massive file containing a deeply nested Table of Contents to test Outline tree traversal logic.
Table of Contents
A document combining both visual TOC text and interactive `/Outlines` dictionaries to test complete navigation extraction.
Frequently Asked Questions
Use Cases
- Testing security scanners that extract URLs from documents to check against malware blocklists.
- Validating PDF-to-HTML pipelines to ensure `<a href="...">` tags are correctly generated based on coordinate intersections.
- Ensuring web viewers properly render interactive Table of Contents sidebars by parsing the `/Outlines` dictionary.