0.0.6 • Published 11 months ago

vue-pdf-kit v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

vue-pdf-kit

A high-definition PDF viewer component for Vue 2 & Vue 3.

npm Version npm Downloads License

Features

  • Ensures high-definition rendering of PDFs.
  • Renders PDF documents in Vue applications, with support for both Vue 2 and Vue 3.
  • Enables text selection and search within the rendered PDF documents.
  • Supports rendering annotations within PDF.

Installation & Usage

npm install vue-pdf-kit
yarn add vue-pdf-kit

Usage

<script setup>
import VuePdfKit from 'vue-pdf-kit'
import 'vue-pdf-kit/dist/style.css'
</script>

<template>
  <VuePdfKit source="<url> | <base64>" enableTextLayer enableAnnotation />
</template>

If you want to use the component in Vue 2.6, you will install it as follows:

npm i @vue/composition-api

Props

NameTypeAccepted valuesDescription
sourcestring `object | URL or Base64 | Source of the document to display
scalenumbernumbersThe ratio of canvas size to document size
enableTextLayerbooleantrue or falsewhether the text layer should be enabled
enableAnnotationbooleantrue or falseWhether annotations should be enabled
passwordstringAny stringPassword for encrypted documents, if required
enableCMapbooleantrue or falseEnables Character Maps for accurate text rendering

Events

NameValueDescription
progress0-1 numberRepresents the current progress or completion ratio of a task or operation, expressed as a percentage.
password{callback:()=>{}}Contains properties related to password handling.

License

MIT License. Please see LICENSE file for more information.

0.0.5

12 months ago

0.0.6

11 months ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago