jsreport-phantom-pdf
Version:
jsreport recipe which is rendering pdf from html using phantomjs
31 lines (20 loc) • 980 B
Markdown
[](https://npmjs.com/package/jsreport-phantom-pdf)
[](https://travis-ci.org/jsreport/jsreport-phantom-pdf)
> jsreport recipe which is rendering pdf from html using phantomjs
See the docs https://jsreport.net/learn/phantom-pdf
> **npm install jsreport-phantom-pdf**
To use `recipe` in for template rendering set `template.recipe=phantom-pdf` in the rendering request.
```js
{
template: { content: '...', recipe: 'phantom-pdf', engine: '...', phantom: { ... } }
}
```
You can apply this extension also manually to [jsreport-core](https://github.com/jsreport/jsreport-core)
```js
var jsreport = require('jsreport-core')()
jsreport.use(require('jsreport-phantom-pdf')({ strategy: 'phantom-server' }))
```