- Add
httpHeaders
option. - Fix loading of remote assets by implementing loadFinish event correctly
- Remove 2 minute force timeout #40
- Add
options.phantomArgs
option requested in #22 - Also load CSS of html head in PDF header & footer #31, #27
- Support iojs by upgrading the phantomjs module to v1.9.16
- From now on options.phantomPath allows you to overwrite the default PhantomJS binary path.
-
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){ stream.pipe(fs.createWriteStream('./foo.pdf')); }); pdf.create(html).toBuffer(function(err, buffer){ console.log('This is a buffer:', Buffer.isBuffer(buffer)); });
- Windows support #6
- Deprecate buffer method, always write to file from the phantom process #6
- Support
<style></style>
in html head. It will be included in head, body & footer of a page. - Parse options.timeout. You can now pass a string.
- Improved options documentation
- Support remote images in html template
- Update phantomjs node module dependency, some cdn changed
- Update lib/index.js
- Document options in README
- Remove temp file when options.filename is not present
- Update README
- Initial pdf.create function with several options