Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-pdf

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-pdf - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

7

Changelog.md

@@ -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 @@ =====

2

lib/pdf.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc