Skip to content

Releases: kempsteven/vue-html2pdf

Update Emited Event Names and Update Documentations

03 Oct 07:03
Compare
Choose a tag to compare

Here is a table of changes I made with the emitted events.

1.7.x 1.8.x (and so on) Description
@hasStartedDownload @startPagination The event "hasStartedDownload" is now changed to "startPagination".
- @hasPaginated The event "hasPaginated" is an event triggered after pagination process is done.
- @beforeDownload The event "beforeDownload" is an event triggered before the PDF generation and downloading. The event arguments contains an object { html2pdf, options, pdfContent }, which can be used to have full control of html2pdf.js like e.g.(Add page count on each PDF page, Full control of jsPDF to design page, etc.), you will have to set the props :enable-download, :preview-modal to false so it will not generate the PDF.
@hasGenerated @hasDownloaded The event "hasGenerated" is now changed to "hasDownloaded".

By using the @beforeDownload event, we can now have the full control of html2pdf.js API.
See a sample use-case here