Hello. I wanted to post a CDN only example for those who are learning pdfmake & vue.js at the same time. This is a single page html file that only needs itself to run. Node.js is not required. Npm is not required. Just a browser to load the page.
I have included as many features and comments as possible. Also all default configurations are explicit so you can learn and understand what they do while looking at a single document.
There are 2 buttons; one that renders PDF in HTML iframe and one that downloads the same PDF as a file optionally with a custom name.
Attached is the PDF output of this example as well.
output.pdf
pdfmake is an awesome library and I wanted to showcase its features in a single, functional, ready to run document.
Instructions
Save the code below to an HTML file and open it in a browser.
Hello. I wanted to post a CDN only example for those who are learning pdfmake & vue.js at the same time. This is a single page html file that only needs itself to run. Node.js is not required. Npm is not required. Just a browser to load the page.
I have included as many features and comments as possible. Also all default configurations are explicit so you can learn and understand what they do while looking at a single document.
There are 2 buttons; one that renders PDF in HTML iframe and one that downloads the same PDF as a file optionally with a custom name.
Attached is the PDF output of this example as well. output.pdf
pdfmake is an awesome library and I wanted to showcase its features in a single, functional, ready to run document.
Instructions