node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.

MIT License

Downloads
533.5K
Stars
3.6K
Committers
23

Bot releases are hidden (Show)

node-html-pdf - Version 3.0.1 Latest Release

Published by marcbachmann over 3 years ago

node-html-pdf - Version 3.0.0

Published by marcbachmann over 3 years ago

Changelog

  • 🛡️ Prevent local file access by default using the localUrlAccess: false option
  • 💥 Drop node versions older than v12

💥 Breaking Change

Prevent local file access by default to fix a security issue.
Please provide the localUrlAccess: true option if you want to keep the old behavior
but keep your system vulnerable to local file access.

Not sure this module is even usable without installing phantomjs manually.
On linux you might need to download the executable.

The tests are running locally on macos.

node-html-pdf - Version 2.1.0

Published by marcbachmann about 8 years ago

node-html-pdf - Version 2.0.1

Published by marcbachmann over 8 years ago

Fix options.directory that can be used as tmp path #117

node-html-pdf - Version 2.0.0

Published by marcbachmann over 8 years ago

  • Upgrade to PhantomJS v2 #107
    There might be some size differences between v1 and v2
  • Add base option to allow relative asset urls #99
node-html-pdf - Version 1.5.0

Published by marcbachmann over 8 years ago

You can use tags with ids in your html to get custom headers and footers:

<div id="pageHeader">Default header</div>
<div id="pageHeader-first">Header on first page</div>
<div id="pageHeader-2">Header on second page</div>
<div id="pageHeader-3">Header on third page</div>
<div id="pageHeader-last">Header on last page</div>
...
<div id="pageFooter">Default footer</div>
<div id="pageFooter-first">Footer on first page</div>
<div id="pageFooter-2">Footer on second page</div>
<div id="pageFooter-last">Footer on last page</div>
node-html-pdf - Version 1.2.1

Published by marcbachmann over 9 years ago

  • Remove 2 minute force timeout #40
node-html-pdf - Version 1.2.0

Published by marcbachmann over 9 years ago

node-html-pdf - Version 1.1.0

Published by marcbachmann over 9 years ago

node-html-pdf - Version 1.0.0

Published by marcbachmann over 9 years ago

  • 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));
    });
    
node-html-pdf - Version 0.3.0

Published by marcbachmann almost 10 years ago

node-html-pdf - Version 0.2.1

Published by marcbachmann about 10 years ago

  • 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
node-html-pdf - Version 0.1.1

Published by marcbachmann over 10 years ago

node-html-pdf - Version 0.1.2

Published by marcbachmann over 10 years ago

node-html-pdf - Version 0.1.3

Published by marcbachmann over 10 years ago

  • Update phantomjs node module dependency, some cdn changed
node-html-pdf - Version 0.2.0

Published by marcbachmann over 10 years ago

  • Support remote images in html template