Skip to content

Releases: marcbachmann/node-html-pdf

Version 3.0.1

Choose a tag to compare

@marcbachmann marcbachmann released this 07 May 08:33
bac0f69
  • 🐛 Actually fix the localUrlAccess: true in #616 using #623 support as the option accidentally got inverted

Version 3.0.0

Choose a tag to compare

@marcbachmann marcbachmann released this 20 Apr 20:06
13b438c

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.

Version 2.1.0

Choose a tag to compare

@marcbachmann marcbachmann released this 17 Aug 21:17
d7ae243
  • Replace multiple occurences of {{page}} and {{pages}} #170
  • Add LICENSE file #169
  • Get rid of 'undefined' in header and footer when empty script and style tags are used in html #167
  • Support a zoomFactor config to support scaling of images #162

Version 2.0.1

Choose a tag to compare

@marcbachmann marcbachmann released this 19 Feb 07:50

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

Version 2.0.0

Choose a tag to compare

@marcbachmann marcbachmann released this 16 Feb 22:34
  • Upgrade to PhantomJS v2 #107
    There might be some size differences between v1 and v2
  • Add base option to allow relative asset urls #99

Version 1.5.0

Choose a tag to compare

@marcbachmann marcbachmann released this 27 Jan 00:10

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>

Version 1.2.1

Choose a tag to compare

@marcbachmann marcbachmann released this 14 Jun 16:31
  • Remove 2 minute force timeout #40

Version 1.2.0

Choose a tag to compare

@marcbachmann marcbachmann released this 27 Apr 06:16
Version 1.2.0

Version 1.1.0

Choose a tag to compare

@marcbachmann marcbachmann released this 27 Apr 06:16
Version 1.1.0

Version 1.0.0

Choose a tag to compare

@marcbachmann marcbachmann released this 25 Jan 20:52
  • 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));
    });