Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var jsreport = require('jsreport-core')()
- jsreport.init().then(function () {
- return jsreport.render({
- template: {
- content: '<h1>Hello {{:foo}}</h1>',
- engine: 'jsrender',
- recipe: 'phantom-pdf'
- },
- data: {
- foo: "world"
- }
- }).then(function(resp) {
- //prints pdf with headline Hello world
- console.log(resp.content.toString())
- });
- }).catch(function(e) {
- console.log(e)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement