1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/public/vendor/jspdf/examples/jaxer.html
2014-04-22 14:33:53 +03:00

15 lines
552 B
HTML

<script runat="server" type="text/javascript" src="../libs/base64.js"></script>
<script runat="server" type="text/javascript" src="../jspdf.js"></script>
<script runat="server" autoload="true" type="text/javascript">
var doc = new jsPDF();
doc.text(20, 20, 'Hello world!');
doc.text(20, 30, 'This is a server-side Jaxer example.');
content = doc.output();
Jaxer.response.addHeader('Content-Disposition', 'attachment; filename=example.pdf');
Jaxer.response.addHeader('Content-Type', 'application/pdf');
Jaxer.response.setContents(content);
</script>