https://github.com/jsreport/toner-wkhtmltopdf
Toner recipe for printing html into pdf using wkhtmltopdf
https://github.com/jsreport/toner-wkhtmltopdf
Last synced: about 1 year ago
JSON representation
Toner recipe for printing html into pdf using wkhtmltopdf
- Host: GitHub
- URL: https://github.com/jsreport/toner-wkhtmltopdf
- Owner: jsreport
- License: mit
- Created: 2015-05-27T12:17:42.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-09T08:53:58.000Z (over 10 years ago)
- Last Synced: 2025-03-27T11:43:35.288Z (about 1 year ago)
- Language: JavaScript
- Homepage: http://jsreport.net
- Size: 6.84 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#toner-wkhtmltopdf
[](https://travis-ci.org/jsreport/toner-wkhtmltopdf)
**[Toner](https://github.com/jsreport/toner) recipe for printing html into pdf using [wkhtmltopdf](http://wkhtmltopdf.org/)**
```bash
npm install toner-wkhtmltopdf
```
```js
toner.recipe("wkhtmltopdf", require("toner-wkhtmltopdf")();
toner.render({
template: {
content: "fooo",
engine: "jsrender",
wkhtmltopdf: {
header: "{{:name}}"
}
},
data : {
name: "Jan Blaha"
}
});
```
##Options
Options passed to `template.wkhtmltopdf` are passed to the wkhtmltopdf binary. See its [docs](http://wkhtmltopdf.org/usage/wkhtmltopdf.txt) for details. Currently supported options are:
- orientation
- header
- footer
- headerHeight
- footerHeight
- marginBottom
- marginLeft
- marginRight
- marginTop
- pageSize
- pageHeight
- pageWidth
- toc
- tocHeaderText
- tocLevelIndentation
- tocTextSizeShrink
- title
##Troubleshooting installation
See https://github.com/pofider/node-wkhtmltopdf-installer