Skip to content

Props



NameDescriptionTypeDefault
afterCanvasLoadedcallback function to call after canvas layer is rendered of each pageRecord<number, CanvasLoadedCallback>undefined
characterMapSpecify the character map (CMap) to be used for text rendering.CharacterMapundefined
darkModeTo set dark theme for the VPV. This can be used with the @update:dark-mode event.v-model:booleanfalse
documentOptionsDocument loading options for configuring how the PDF is fetched and loaded. Controls chunk size, streaming, and auto-fetch behavior.PDFDocumentOptionsundefined
downloadFilenameThe name of the PDF file to be used when downloading. Remark: If undefined, the original filename will be used.stringundefined
initialPageThe page number of the PDF document that will be displayed on first load.number1
initialRotationThe initial rotation of the PDF document with respect to the VPV viewer.number0 (0, 90, 180, 270)
initialScaleThe initial zoom level of the PDF document with respect to VPV. If unspecified, it is determined by the page dimensions and the width of the container.number | ZoomLevelZoomLevel.PageFit (Scale ranges from 0 to 1.)
initialScrollMode deprecatedThe initial scroll mode of VPV.
Remark: Will be removed in the near future.
ScrollModeScrollMode.Vertical
initialSearchset initial text to search in PDFv-model:stringundefined
initialThumbnailsVisibleTo display thumbnail on first loadbooleanfalse
initialViewMode deprecatedThe initial view mode of VPV.
Remark: Will be removed in the near future.
ViewModeViewMode.SinglePage
localeThe locale string key, which must match the key of the localization object; otherwise, it will fall back to en_USv-model:stringen_US
localizationThe locale object that will be used in the componentRecord<string, Localization>{ en_US: ...locale, zh_CN: ...locale, it_IT: ...locale, pt_PT: ...locale, th_TH: ...locale }
scrollModeTo set the scroll mode of the VPVScrollModeScrollMode.Vertical
selectionModeDouble binding selection mode of VPV. Controls how users interact with PDF content (text selection or hand tool for panning).SelectionModeSelectionMode.Text
showPasswordModalControl whether the built-in password modal dialog is displayed when loading a password-protected PDF. Set to false to handle password input with a custom UI via the Password Controller.booleantrue
srcSource of the PDF documentstring | Ref<string>-
textLayerA layer on a PDF to allow users to select text
Remark: Search, highlight text, and selection mode features depend on this property. If you disable it, these features won't work.
booleantrue
toolbarOptionsDetermine whether the toolbar is visible in VPV.
Remark: The toolbar consists of top bar and left sidebar.
Partial<ToolbarOptions> | falseToolbarOptions, If false, the toolbar will not show.
viewModeTo set the view mode for the VPVViewModeViewMode.SinglePage
wasmUrl(Since v4.1.0) The URL or relative path, including the trailing slash, to the directory containing pdf.js WASM files (e.g. '/assets/pdfjs-wasm/'). Here are the official WASM files.
Remark: Only required when hosting WASM assets at a custom path, such as for JPEG 2000.
string-
workerUrlThe URL or relative path pointing to the web worker file for handling PDF document which must correspond to the pdfjs-dist version being used.
Normally, you will not need to configure the workerURL. To do so, please refer to overriding dependency
string-