Bookmark pages in Microsoft Edge's built-in PDF viewer. Add titled bookmarks, jump to any page instantly, drag the panel to reposition it, and have all bookmarks persist across sessions — without reloading the PDF.
- Named bookmarks — give each bookmark a meaningful title
- One-click navigation — click a bookmark to jump straight to that page
- Persistent storage — bookmarks are saved per PDF URL and survive browser restarts
- Draggable panel — drag the toggle tab to any vertical position; works with mouse and touch
- Per-PDF overview — the toolbar popup shows all PDFs you have bookmarked
- Open Edge and go to
edge://extensions - Enable Developer mode (toggle, top-right)
- Click Load unpacked
- Select the
pdf-bookmarker/folder - The extension icon appears in your toolbar
- Open any
.pdffile in Edge - A bookmark tab appears on the right edge of the window — click it to open the panel
- Type a title, enter the page number, click Add
- Click any bookmark in the list to jump to that page
- Click ✕ next to a bookmark to delete it
- Drag the tab up or down to reposition it; the position is remembered
pdf-bookmarker/
├── manifest.json Extension manifest (Manifest V3)
├── background.js Service worker — CDP page navigation + storage
├── content.js Injects the bookmark sidebar into PDF pages
├── sidebar.css Sidebar overlay styles
├── popup.html Toolbar popup UI
├── popup.js Popup logic
├── create_icons.py Helper script used to generate the PNG icons
└── icons/
├── icon16.png
├── icon48.png
└── icon128.png
Edge's Adobe-powered PDF viewer renders its toolbar inside a native <embed> element. This means the page-number field is completely invisible to JavaScript (querySelectorAll, shadow-DOM walks, and the CDP Accessibility tree all see nothing from the viewer). Standard window.location.hash tricks have no effect either.
Navigation is achieved via the Chrome DevTools Protocol (CDP) through the chrome.debugger API:
- Attach a debugger session to the PDF tab
- Check for
PDFViewerApplication(handles the old PDF.js-based viewer) - Use
Input.dispatchMouseEventto click the page-number field in the toolbar at its known coordinates(window.innerWidth / 2, 30), followed byInput.insertTextand anEnterkeystroke - Detach the debugger immediately — the "Edge is being controlled" banner disappears right away
bookmark click
└─▶ background.js (service worker)
├─ chrome.debugger.attach
├─ S1: PDFViewerApplication.page = N (PDF.js viewer)
└─ S2: mouse click + type + Enter (Adobe viewer)
└─ chrome.debugger.detach
The brief "Edge is being controlled by an extension" banner during navigation is an unavoidable consequence of using the chrome.debugger API and disappears within a fraction of a second.
| Permission | Why it's needed |
|---|---|
storage |
Persist bookmarks per PDF URL |
activeTab |
Read the current tab's URL to scope bookmarks |
tabs |
Query tab IDs for CDP targeting |
debugger |
Attach CDP to send mouse/keyboard events to the PDF viewer |
windows |
(Reserved for future use) |
- Adobe viewer only — tested against Edge's Adobe-powered PDF viewer (
NewPDFReaderEnabled). The old PDF.js viewer is also supported via Strategy 1. - Manual page entry — the viewer does not expose the current page number to JavaScript, so page numbers must be entered manually when creating bookmarks.
edge://internal URLs — PDFs served fromedge://internal pages are not supported; onlyhttp://,https://, andfile://URLs are matched.- Embedded PDFs — PDFs inside
<iframe>elements on web pages are not supported.
- Export / import bookmarks as JSON
- Bookmark reordering (drag-and-drop within the list)
- Search / filter bookmarks
- Color labels for bookmarks
- Auto-detect current page via MutationObserver on the toolbar