vue-pdfeasy
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

Vue PDFEasy

A PDFEasy plugin for Vue 3.x

Install

npm i vue-pdfeasy

Example

//...
import { PDFPlugin } from 'vue-pdfeasy';
//...
const app = createApp(App);
app.use(PDFPlugin);
app.mount('#app');

// ...

<template>
  <iframe id="pdf" />
</template>

<script setup lang="ts">
import { usePDF } from 'vue-pdfeasy'

const pdf = usePDF()

pdf.new()

pdf.add([
  { raw: 'Simple text!' },
])

pdf.run({
  type: 'client',
  clientEmit: 'blob'
}).then((blob) => {
  const iframe = document.querySelector('#pdf')

  iframe.src = blob
}).catch((err) => {
  console.error(err)
})
</script>

/vue-pdfeasy/

    Package Sidebar

    Install

    npm i vue-pdfeasy

    Weekly Downloads

    2

    Version

    1.4.0

    License

    MIT

    Unpacked Size

    7.11 kB

    Total Files

    7

    Last publish

    Collaborators

    • novout