Reputation: 1
Hallo I'm not an js programmer but a frind asked me to write an litle form wich should produce an pdf document at the end. So I thought that could't be so dificult.
Finally I found the following engine. But I'm unable to get it working.
I incuded pdfmake.min.js ;vfs_fonts.js ;jquery.min.js
.
Had anyone already used this engine? And was able to produce an pdf.
and tried this example code:
<script type=\"text/javascript?\" charset=\"utf-8\">
var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
pdfMake.createPdf(docDefinition).open(test.pdf);
</script>
Upvotes: 0
Views: 1762
Reputation: 1280
The problem is, test.pdf is not in quotes. Try this,
<script>
var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
pdfMake.createPdf(docDefinition).open('test.pdf');
</script>
Upvotes: 1
Reputation: 413
Don't use minified version of the library, then it works…
Edit: Sorry, use pdfmake.js
Upvotes: 0