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.)
initialScrollModeThe initial scroll mode of VPV. will be removed in the next major version recommend to use scrollModeScrollModeScrollMode.Vertical
initialSearchset initial text to search in PDFv-model:stringundefined
initialThumbnailsVisibleTo display thumbnail on first loadbooleanfalse
initialViewModeThe initial view mode of VPV. (will be removed in the next major version recommend to use viewMode)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 }
scrollModeDouble binding scroll mode of VPV. (not recommend to use with initialScrollMode)ScrollModeScrollMode.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.
viewModeDouble binding view mode of VPV. (not recommend to use with initialViewMode)ViewModeViewMode.SinglePage
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-