Skip to content

dlong500/toner-wkhtmltopdf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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

About

Toner recipe for printing html into pdf using wkhtmltopdf

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%