Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1.04 KB

README.md

File metadata and controls

53 lines (42 loc) · 1.04 KB

#toner-wkhtmltopdf

Build Status

Toner recipe for printing html into pdf using wkhtmltopdf

npm install toner-wkhtmltopdf
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 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