Skip to content

Props ​

All props are optional except source. The three view-state props – page, rotation, and zoom – are two-way bindable and documented under v-model bindings below. The types named in the table are exported from vue-pdfz.

PropTypeDefaultDescription
sourcePdfSourceProp–The document to display: a URL, binary data, or a PdfSource config object.
annotationLayerbooleantrueRender the annotation layer (links, form widgets, popups).
enableDownloadbooleantrueShow the download action (toolbar button, method, and shortcut).
enableKeyboardbooleantrueEnable keyboard shortcuts.
enablePrintbooleantrueShow the print action (toolbar button, method, and shortcut).
enableSearchbooleantrueEnable full-text search.
formsboolean | 'readonly'falseAcroForm fields: true interactive, 'readonly' rendered but non-editable, false off.
imageResourcesPathstring–PDF.js path for annotation icon images.
layoutLayoutMode'continuous'Page layout mode.
lazybooleantrueDefer per-page rendering until the page nears the viewport.
linkRelstring'noopener noreferrer'rel attribute applied to external links.
linkTargetLinkTarget'_blank'target attribute applied to external links.
localestring–Locale code for the viewer UI. Falls back to the plugin locale, then 'en'.
maxZoomnumber10Maximum zoom scale.
messagesPartial<LocaleMessages>–Per-instance message overrides, merged over the active locale bundle.
minZoomnumber0.1Minimum zoom scale.
searchControlsSearchControls–Which search-bar toggles to show. Both hidden by default.
shortcutsKeyboardShortcuts–Per-action keyboard-shortcut overrides.
showThumbnailsboolean | 'auto''auto'Thumbnails sidebar: 'auto' opens it on wide containers only, true opens it everywhere, false disables it (no toggle). Always toggleable at runtime unless false.
showToolbarbooleantrueShow the toolbar.
textLayerbooleantrueRender the selectable text layer. Required for search and text selection.
themeThemeMode–Color-scheme mode.
themeTokensThemeTokens–Design-token overrides, merged over the theme and any plugin-wide tokens.
thumbnailWidthnumber120Rendered width of each thumbnail, in pixels.
virtualizationbooleanfalseWindow page rendering for very large documents.
zoomStepnumber0.25Zoom increment for zoom-in / zoom-out.

v-model bindings ​

Three props are two-way bindable and also emit an update:* event:

  • v-model:page – the current page number (number, default 1).
  • v-model:rotation – 0 | 90 | 180 | 270 (default 0).
  • v-model:zoom – a number or one of 'auto' / 'page-fit' / 'page-width' (default 'auto').