app
adom-pdf-viewer
UnreviewedIn-page PDF viewer for Hydrogen webview tabs — PDF.js + thumbnail strip + citation-aware highlighting + reveal-in-VS-Code.
{
"schema_version": 1,
"type": "app",
"slug": "adom-pdf-viewer",
"title": "adom-pdf-viewer",
"brief": "In-page PDF viewer for Hydrogen webview tabs — PDF.js + thumbnail strip + citation-aware highlighting + reveal-in-VS-Code.",
"version": "0.1.0",
"tags": [],
"license": "MIT",
"sample_prompts": [
{
"label": "Deep-link a datasheet page",
"prompt": "Open the RP2040 datasheet in adom-pdf-viewer at page 608"
},
{
"label": "Cite multiple pages",
"prompt": "Open this datasheet PDF with cited pages 11-14 + 608-609 highlighted in thumbnails"
},
{
"label": "Reveal the source file",
"prompt": "Open the local PDF with a reveal-in-VS-Code button in the topbar"
}
],
"install": {
"binary_name": "adom-pdf-viewer",
"install_dir": "",
"install_hint": "",
"version_cmd": ""
},
"readme": "---\nname: adom-pdf-viewer\ndescription: In-page PDF viewer for Adom Hydrogen webview tabs — PDF.js-rendered with thumbnail strip, deep-link to specific pages, citation-aware highlighting, \"reveal in VS Code\" and download affordances. Solves the Hydrogen-no-native-PDF problem so any tool can deep-link a datasheet page in-app instead of triggering a download to Acrobat. Trigger words — pdf viewer, in-page pdf, datasheet viewer, pdf.js, deep link pdf page, datasheet page jump, pdf thumbnails, cite pdf page, pdf in webview, pdf deep link, open datasheet at page, pdf viewer adom, pdfviewer.\n---\n\n# adom-pdf-viewer — in-page PDF viewer for Hydrogen webview tabs\n\nThe Hydrogen webview ships without a native PDF renderer. Loading a\n.pdf URL directly (or via `<iframe>`/`<embed>`) shows a \"blocked\"\nicon. Browsers configured to \"always download PDFs\" also lose the\n`#page=N` fragment when the file jumps to Acrobat / Preview.\n\n`adom-pdf-viewer` wraps the PDF in a **PDF.js-canvas** viewer with:\n\n- thumbnail strip on the left (lazy-rendered, IntersectionObserver)\n- prev/next + page-number input + ← / → keyboard shortcuts\n- **citation-aware highlighting** — pass a JSON manifest of cited\n pages and the viewer highlights each thumb in brand-yellow with\n a snippet label inline (\"footprint pad geometry\", \"GLB / package\n model\", etc.). A summary chip strip at the top of the canvas\n lets the user click any cited page directly.\n- **download** + **reveal in VS Code Explorer** affordances (the\n reveal button POSTs to `/api/reveal` which shells `adom-vscode\n reveal <path>`, with the workspace-boundary precheck per\n `gallia/skills/human-ui-patterns` §5b)\n\nBrand-compliant: monochrome SVG icons, Satoshi/Familjen-Grotesk\nfonts, dark steel-gradient page background, no color emoji.\n\n## Run as a service\n\n```bash\nadom-pdf-viewer --port 8981\n```\n\nThen open the viewer in any Hydrogen webview tab:\n\n```text\nhttps://<container-proxy>/proxy/8981/v?src=<URL>&page=<N>\n```\n\n## Query parameters\n\n| Param | Type | Description |\n|---|---|---|\n| `src` | URL (required) | PDF URL — same-origin or absolute. The viewer fetches it client-side via PDF.js. |\n| `page` | int (default 1) | Initial page to render. |\n| `cites` | JSON (optional) | Array `[{ page: int, label: string, section?: string }]` of cited pages to highlight. The same `page` can appear multiple times — labels are deduped per page. |\n| `title` | string (optional) | Topbar title (e.g. \"RP2040 datasheet\"). |\n| `reveal` | absolute path (optional) | If present, the topbar shows a `📁 reveal` button that opens VS Code's Explorer at that path. Subject to the workspace-boundary precheck. |\n\n## Example\n\n```text\n.../proxy/8981/v?src=https://example.com/RP2040.pdf\n &page=608\n &title=RP2040+datasheet\n &reveal=/home/adom/project/.../RP2040.pdf\n &cites=[{\"page\":608,\"label\":\"footprint pad geometry\"},\n {\"page\":11,\"label\":\"symbol pinout definition\"}]\n```\n\n## How tools should cite\n\nWhen a tool emits a provenance / citation string referencing a\ndatasheet page, it should ALSO surface a clickable chip that opens\nthe citation in `adom-pdf-viewer`. The viewer's thumbnail strip\nmakes the cited page obvious and the user can verify the AI's\nclaim in one click.\n\nThe `aci-provenance` MVP shows the canonical wiring — see its\n`linkifyPages` helper which renders every \"page N\" / \"pages N-M\"\nmention as a chip group with three click targets:\n\n1. **text link** → `/v?src=…&page=N&cites=…` (in-page viewer)\n2. **↗ icon** → native browser tab (uses the user's PDF handler)\n3. **⬇ icon** → forced download\n\n## API\n\n`GET /v?src=…` — render the viewer page.\n`GET /health` — `{ ok: true, app: \"adom-pdf-viewer\" }`.\n`POST /api/reveal` — body `{ path: \"/abs/path\" }` → shells\n`adom-vscode reveal`. Workspace-boundary-precheck per the\nhuman-ui-patterns skill.\n\n## Why it's separate from the consumer apps\n\nEvery Adom tool that wants to deep-link a datasheet page hits the\nsame problem (no native PDF in webview, page jump lost on\ndownload). Centralizing the viewer means:\n\n- one PDF.js dependency, not N\n- one citation manifest schema across every consumer\n- one place to fix browser-blocked-PDF issues\n- one consistent UX for all datasheet viewing\n\nConsumers today: `aci-provenance`, `adom-chipfit`,\n`aci component`'s live-build dashboard. Future: `aci library`,\n`datasheet-parser` (each cropped figure deep-links back to the\npage in the wrapper), `aci review`.\n",
"author": {
"id": "695820315b5f1e4db2fcf602",
"name": "Kyle Bergstedt",
"email": "[email protected]"
},
"visibility": {
"public": true
},
"hero": null,
"discovery_triggers": [],
"discovery_pitch": null,
"metadata": {},
"created_at": "2026-05-28T05:29:16.668Z",
"updated_at": "2026-05-28T05:29:16.668Z",
"skills": []
}