doc.save() throwing error with jspdf
javascript, jquery, jspdf
Solution
Found out what the issue was. The saveAs function is part of FileSaver.js so I just needed to include this and everything worked.
Problem
When I try and use the save() function for jsPDF it's throwing the following error: ReferenceError: saveAs is not defined I'm just trying a very simple example: ``` var doc = new jsPDF(); doc.text(20, 20, 'Hello world!'); doc.text(20, 30, 'This is client-side Javascript, pumping out a PDF.'); doc.addPage(); doc.text(20, 20, 'Do you like that?'); doc.save('test.pdf'); ``` Anyone have any ideas what's wrong?