Version 1.0.0
-
Catch phantomjs errors 517d307
-
new module API #11
pdf = require('html-pdf') pdf.create(html).toFile(filepath, function(err, res){ console.log(res.filename); }); pdf.create(html).toStream(function(err, stream){ steam.pipe(fs.createWriteStream('./foo.pdf')); }); pdf.create(html).toBuffer(function(err, buffer){ console.log('This is a buffer:', Buffer.isBuffer(buffer)); });