Hi, I’m facing a tiny issue though I don’t know how to fix it.
I’m trying to use jsPDF libary to generate pdf using vue.js.
I simply install jsPDF
npm install jspdf --save
and try this sample code
var doc = new jsPDF() doc.text('Hello world!', 10, 10) doc.save('a4.pdf')
It gives me this error
ReferenceError: jsPDF is not defined
It seems vue doesn’t know anything about the jsPDF module. I think I can’t use Vue.use(jsPDF)
becasue jsPDF is not a vue.js pluggin. So how can I export this libary to my project?
Thnaks in advanced!