JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 383
  • Score
    100M100P100Q95504F
  • License MIT

Downloads and installs wkhtmltopdf

Package Exports

  • wkhtmltopdf-installer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wkhtmltopdf-installer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

wkhtmltopdf-installer

NPM Version License Build Status

npm install wkhtmltopdf-installer

An NPM installer for wkhtmltopdf utility. The package automatically downloads platform specific wkhtmltopdf binary if not already available as global command.

Basics

This package is a port of phantomjs npm installer with the same API.

var path = require('path');
var childProcess = require('child_process');
var binPath  = require('wkhtmltopdf-installer').path;

var childArgs = [
  path.join(__dirname, 'test.html'),
  path.join(__dirname, 'out.pdf'),
]

childProcess.execFile(binPath, childArgs, function(err, stdout, stderr) {
  // handle results
})

Troubleshooting

This package should support windows, linux and osx as well. For linux you may need to install some additional packages, see more here.

There is currently support just for x64.

wkhtmltodf downloads page provides different packages for every linux distribution and version. This project currently just grabs the binary from Linux (Debian Wheezy). These binaries seems to work on Ubuntu as well.

License

MIT