htmlto
v1.1.2
Published
module to generate pdf,png,jpeg from html
Downloads
6
Maintainers
Readme
var htmlTo = require('htmlto');
var options = {
pathTohtml:'./public/html/index.html',
pathTopdf:'./public/pdf/index.pdf',
}
htmlTo.pdf(options)
Example pdf generator
var htmlTo = require('htmlto');
var options = {
pathTohtml:'./public/html/index.html',
pathTopdf:'./public/pdf/index.pdf',
paperSize:{
format: 'A4',
orientation: 'portrait',
margin: '1.5cm'
}
}
htmlTo.pdf(options,function(err,result){
if(err) throw err;
console.log('result :',result)
})
Example keyword density
var htmlTo = require('htmlto');
var options = {
pathTohtml:'./public/html/keyword_index.html',
}
/*
or pass url as
var options = {
url:'http://example.org'
}
*/
htmlTo.keywordDensity(options,function(err,result){
if(err) throw err;
console.log('result :',result)
})