Skip to content

youzhi-qiang/VuePDF

 
 

Repository files navigation

VuePDF

Latest version Downloads License

Introduction

VuePDF is a Vue 3 component for pdf.js that allows you to flexibly display PDF pages within your project.

Installation

npm i @tato30/vue-pdf
yarn add @tato30/vue-pdf

Basic Usage

<script setup>
import { VuePDF, usePDF } from '@tato30/vue-pdf'

const { pdf, pages, info } = usePDF('document.pdf')

console.log(`Document has ${pages} pages`)
console.log(`Document info: ${info}`)
</script>

<template>
  <VuePDF :pdf="pdf" />
</template>

Reference

Releases

No releases published

Packages

No packages published

Languages

  • Vue 54.3%
  • TypeScript 44.3%
  • HTML 1.1%
  • JavaScript 0.3%