kempsteven / vue-html2pdf

vue-html2pdf converts any vue component or element into PDF, vue-html2pdf is basically a vue wrapper only and uses html2pdf.js behind the scenes.
https://www.npmjs.com/package/vue-html2pdf
MIT License
432 stars 75 forks source link

Weird page load glitch #135

Open anzuj opened 2 years ago

anzuj commented 2 years ago

Describe the bug Upon page load, there's a dark-grey box appearing on the left side of the screen and it disappears after half a second. This results in a flicker every time the page with the PDF download button is loaded. How can I avoid this?

(not sure if relevant, but I'm also using Vuetify)

To Reproduce Steps to reproduce the behavior: Put the following in the template. Reload page.

  <button @click="generateReport"> PDF</button>
       <vue-html2pdf
        :show-layout="false"
        :float-layout="true"
        :enable-download="true"
        :preview-modal="false"
        :paginate-elements-by-height="1400"
        filename="Dashboard"
        :pdf-quality="2"
        :manual-pagination="false"
        pdf-format="a4"
        pdf-orientation="portrait"
        pdf-content-width="800px"
        ref="html2Pdf"
    >
        <section slot="pdf-content">
    content for pdf
        </section>
    </vue-html2pdf>

Screenshots flicker

Package Version e.g. 1.8.0