1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 06:02:39 +01:00
invoiceninja/public/vendor/jspdf/examples/jaxer.html

15 lines
552 B
HTML
Raw Normal View History

2014-04-22 13:33:53 +02:00
<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>