Closed ishwarrimal closed 7 years ago
var conversion = require("phantom-html-to-pdf")();
conversion({ html: "<h1>Hello World</h1>" }, function(err, pdf) {
console.log(pdf.logs);
console.log(pdf.numberOfPages);
pdf.stream.pipe(res);
});
The package offers stream in callback, save it to file with name of your wish.
There is not much description on generating .pdf file from html. I was using html-pdf where i could provide the name of the file that i want to generate and other stuff. I am quite lost in this. Please help me out.