vue-html2pdf icon indicating copy to clipboard operation
vue-html2pdf copied to clipboard

Use @beforeDownload and generatePdf() action generates two PDF

Open JacquesJahnichen opened this issue 2 years ago • 2 comments

Hello,

How can I add a button to "Dowload the PDF" and use @beforeDownload in a same time to add a footer ? When I do that I download two pdf

image

image

JacquesJahnichen avatar Jul 27 '22 12:07 JacquesJahnichen

A little reminder on this subject

JacquesViviarto avatar Aug 09 '22 09:08 JacquesViviarto

If anyone has an idea to solve this problem, it is welcome.

JacquesViviarto avatar Aug 22 '22 06:08 JacquesViviarto

+1

rogerio-pereira avatar Oct 17 '22 21:10 rogerio-pereira

@JacquesViviarto set both variables: preview-modal and enable-download to false

That solved for me

rogerio-pereira avatar Oct 19 '22 20:10 rogerio-pereira

@JacquesViviarto set both variables: preview-modal and enable-download to false

That solved for me

The problem of this solution is that now the @hasDownloaded doesn't work anymore, if anyone has a solution please let me know

AloneInMyMind avatar Oct 25 '22 15:10 AloneInMyMind

@AloneInMyMind use beforeDownload, also set both variables. It`s working for me

rogerio-pereira avatar Oct 25 '22 18:10 rogerio-pereira

Thanks for your help. This config work for me

<vue-html2pdf
          :preview-modal="false" 
          :enable-download="false"
          @beforeDownload="beforeDownload">

JacquesViviarto avatar Nov 14 '22 14:11 JacquesViviarto