vue3-pdfmake-v2
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Vue PDFMake

This project forked from vue-pdfmake

A PDFMake plugin for vue 3.x

Install

yarn add vue3-pdfmake-v2

OR

npm install vue3-pdfmake-v2

in main.(js|ts)

import { createApp } from 'vue';
import { PDFPlugin } from 'vue3-pdfmake-v2';
import App from './App.vue';

const app = createApp(App);
//...
app.use(PDFPlugin);
//...
app.mount('#app');

Example

<script setup>
import { usePDF } from 'vue3-pdfmake-v2';

const pdfmake = usePDF({
  autoInstallVFS: true
})

const onGenPDF = () => {
  pdfmake.createPdf({
    content: [
      'Hello World From PDFMake!',
    ]
  }).download();
}
</script>

<template>
  <button @click="onGenPDF">Click here for download demo pdf</button>
</template>

Documentation

Check PDFMake Documentation for more explanations!

Readme

Keywords

Package Sidebar

Install

npm i vue3-pdfmake-v2

Weekly Downloads

7

Version

1.0.0

License

MIT

Unpacked Size

8.92 MB

Total Files

9

Last publish

Collaborators

  • krittapoj.lert