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
439 stars 75 forks source link

How to add a footer #121

Open cjh-store opened 2 years ago

cjh-store commented 2 years ago

How to add a footer to each page in the case of automatic paging

Zakarya-Netlinks commented 2 years ago

@cjh-store Did you find anything?

MominBinShahid commented 2 years ago

We can add a footer with a little bit of bottom margin (using html-to-pdf-options) and beforeDownload method

An example of the automatic paging is given here using beforeDownload method

Another example of a footer at bottom of the page is here as follows:

Use bottom margin by html-to-pdf-options prop like this

image

and insert page number with the company name (for example) like this inside the beforeDownload method (this is an extended version of the example referred to above

image

Here is what is looks like

image

Hope it helps

aliwesome commented 1 year ago

How can we add a Vue component for footer and header?