MeldUI

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.). All Phase 1 plugins are always registered; the features flags control toolbar / UX visibility, not plugin presence (see Plugin registration pattern below). Only the Phase 2 plugins are gated by their flag. 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

Always registered. The listed features flag toggles the corresponding toolbar UI; the plugin (and its composables) stay available regardless:

  • zoom — toolbar gated by features.zoom
  • rotate — toolbar gated by features.rotate
  • spread — toolbar gated by features.spread
  • pan — toolbar gated by features.pan
  • fullscreen — toolbar gated by features.fullscreen

Interaction

Both always registered:

  • interaction-manager — always on (bridges pointer events for pan, selection, and annotation tools)
  • selection — always registered; the SelectionLayer is gated by features.selection

Discovery & navigation

Always registered; the listed flag toggles the corresponding UI:

  • search — search layer / popover gated by features.search
  • bookmark — outline panel gated by features.outline
  • thumbnail — thumbnails panel gated by features.thumbnails

Output

Always registered (both the Export and Print plugins):

  • export — Download / Print buttons gated by features.download / features.print; powers saveAsCopy()

Editing (Phase 1)

Always registered:

  • hotkeys — Commands plugin; key bindings gated by features.keyboardShortcuts
  • annotation — annotation tools / toolbar gated by features.annotations
  • history — undo/redo surfaced via features.undoRedo (auto-on when annotations are enabled)

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 builds the EmbedPDF registration list from the resolved ViewerFeatures and FeatureConfig. The order matters because some plugins depend on others (e.g. annotation needs interaction-manager, selection, and history to be registered first), so the registry emits them in dependency order.

All Phase 1 plugins are always registered — this keeps the plugin composables safe to call unconditionally (Vue’s setup() can’t call useZoom() inside an if, and EmbedPDF composables throw when their plugin is missing). The features flags therefore control toolbar visibility and UX, not plugin presence. Only the Phase 2 plugins (stamp, signature, redaction, form, attachment) are conditionally registered.

resolveFeatures merges a partial ViewerFeatures over DEFAULT_FEATURES:

import { resolveFeatures } from '@meldui/vue'

const merged = resolveFeatures(userFeatures)
// merged is the effective Required<ViewerFeatures> (defaults filled in)

See also