I have a component that uses jsPDF instead of html2pdf. I found jsPDF easier to use and more reliable. In addition it lets you select and search for text.
I have extended @jmikem 's PDF component which is based on @church 's tutorial on html2pdf and added handlebars.js to the mix.
You pass in a handlebars template, some css and some JSON and you will get back a PDF ready to download.
This is the component JSON file and here is a sample app that uses it to make an invoice.
A few notes.
This uses jsPDF and not html2pdf. I could never get pagination working with html2pdf. jsPDF has pretty rudimentary pagination (it will only prevent page breaks wi…