<pdf-viewer>
A standalone web component for viewing PDF documents
Features
PDF.js Powered
High-fidelity PDF rendering via Mozilla's PDF.js library.
Navigation
Page-by-page or continuous scroll with keyboard shortcuts.
Zoom Controls
Fit-width, fit-page, manual zoom, and pinch-to-zoom on touch.
Text Search
Full-text search with match highlighting and navigation.
Thumbnails
Sidebar with lazy-rendered page thumbnails for quick navigation.
Dark Mode
Auto-detects page theme or set explicitly via attribute.
File Input
Drag-and-drop, file picker, or programmatic ArrayBuffer loading.
Fully Themeable
13+ CSS custom properties for complete visual customization.
Quick Start
Installation
Install via npm:
Or include via CDN:
Basic Usage
With Options
Related Components
Part of the ProfPowell vanilla web components suite: