Comparing version 1.1.0 to 1.2.0
@@ -0,1 +1,8 @@ | ||
1.2.0 | ||
===== | ||
- Add `options.phantomArgs` option requested in [#22](https://github.com/marcbachmann/node-html-pdf/issues/22) | ||
- Also load CSS of html head in PDF header & footer [#31](https://github.com/marcbachmann/node-html-pdf/issues/31), [#27](https://github.com/marcbachmann/node-html-pdf/issues/27) | ||
- Support iojs by upgrading the phantomjs module to v1.9.16 | ||
1.1.0 | ||
@@ -2,0 +9,0 @@ ===== |
@@ -97,3 +97,3 @@ // Generated by CoffeeScript 1.9.1 | ||
var child, stderr, stdout, timeout; | ||
child = childprocess.spawn(this.options.phantomPath, [this.script]); | ||
child = childprocess.spawn(this.options.phantomPath, [this.script].concat(this.options.phantomArgs)); | ||
stdout = []; | ||
@@ -100,0 +100,0 @@ stderr = []; |
@@ -63,4 +63,7 @@ // Generated by CoffeeScript 1.9.1 | ||
content = page.evaluate(function() { | ||
var $body, $footer, $header, body, footer, header, ref1, styles; | ||
styles = ((ref1 = document.querySelector('head style')) != null ? ref1.outerHTML : void 0) || ''; | ||
var $body, $footer, $header, body, footer, header, styles; | ||
styles = document.querySelectorAll('link,style'); | ||
styles = Array.prototype.reduce.call(styles, (function(string, node) { | ||
return string + node.outerHTML; | ||
}), ''); | ||
if ($header = document.getElementById('pageHeader')) { | ||
@@ -67,0 +70,0 @@ header = $header.outerHTML; |
{ | ||
"name": "html-pdf", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "HTML to PDF converter that uses phantomjs", | ||
@@ -20,3 +20,3 @@ "main": "lib/index.js", | ||
"optionalDependencies": { | ||
"phantomjs": "^1.9.8" | ||
"phantomjs": "^1.9.16" | ||
}, | ||
@@ -23,0 +23,0 @@ "repository": { |
@@ -85,2 +85,3 @@ # node-html-pdf | ||
"phantomPath": "./node_modules/phantomjs/bin/phantomjs", // PhantomJS binary which should get downloaded automatically | ||
"phantomArgs": [], // array of strings used as phantomjs args e.g. ["--ignore-ssl-errors=yes"] | ||
"script": '/url', // Absolute path to a custom phantomjs script, use the file in lib/scripts as example | ||
@@ -87,0 +88,0 @@ "timeout": 30000 // Timeout that will cancel phantomjs, in milliseconds |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28121
277
94