mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 06:02:39 +01:00
15 lines
552 B
HTML
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>
|