Document Viewer: Plugin Reference
One-page summary of every EmbedPDF plugin used by DocumentViewer, organized by purpose.
DocumentViewer is built on EmbedPDF’s plugin architecture. Each plugin handles one concern (zoom, search, annotations, etc.) and is registered only when its corresponding features flag is on. This page lists every plugin in scope and links to its reference.
Always-on (no feature flag)
These five plugins constitute the minimum PDF rendering pipeline. They’re always registered:
- document-manager — orchestrates document lifecycle (load, switch, unload)
- viewport — owns the scrollable container DOM
- scroll — page-aware virtual scrolling
- render — paints pages to canvas
- tiling — splits large pages into tiles for memory efficiency
View controls
Toggle viewport behaviour and orientation. Each opt-in via a features flag:
- zoom —
features.zoom - rotate —
features.rotate - spread —
features.spread - pan —
features.pan - fullscreen —
features.fullscreen
Interaction
- interaction-manager — auto-enabled by
pan,selection, orannotations - selection —
features.selection(also auto-enabled byannotations)
Discovery & navigation
Output
- export —
features.print,features.download; powerssaveAsCopy()
Editing (Phase 1)
- hotkeys —
features.keyboardShortcuts - annotation —
features.annotations - history —
features.undoRedo
Phase 2 plugins (forthcoming)
These plugin pages will land when their feature flags ship in Phase 2:
stamp,signature,redaction,form,attachment
Plugin registration pattern
Internally, pluginRegistry.ts is a pure function from ViewerFeatures → PluginRegistration[]. The order matters because some plugins depend on others (e.g. annotation needs interaction-manager). The registry handles dependency ordering automatically; you don’t need to think about it when toggling features.
import { resolveFeatures, DEFAULT_FEATURES } from '@meldui/vue'
const merged = resolveFeatures(DEFAULT_FEATURES, userFeatures)
// merged is the effective ViewerFeatures with auto-enabled dependencies
See also
- Features — the
featuresprop flag table - Bundle & Perf — bundle impact of each flag