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

    1.2.0 • Public • Published

    Vue PDFMake

    A PDFMake plugin for 3.x

    Install

    yarn add vue3-pdfmake

    OR

    npm install vue3-pdfmake

    in main.(js|ts)

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

    Example

    <script setup>
      import { onMounted } from 'vue';
      import { usePDF } from 'vue3-pdfmake';
    
      const pdf = usePDF();
    
      onMounted(() => {
    
        pdf.createPdf({}).download();
      });
    </script>

    WARNING: Depending on how the instance was initialized, use const pdf = usePDF().default instead const pdf = usePDF()

    Keywords

    Install

    npm i vue3-pdfmake

    DownloadsWeekly Downloads

    37

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    4.42 kB

    Total Files

    6

    Last publish

    Collaborators

    • novout