Skip to content
Webservice for generating pdfs from html
Branch: master
Clone or download
Latest commit db8b660 May 12, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin revert phantomjs-prebuild, it crashes and has zooming issues Feb 8, 2017
config use mocha-jshint Nov 23, 2013
favicon favicons Feb 15, 2015
lib Support for data: URIs (#59) Apr 26, 2017
public add auction and remove fb May 12, 2019
test Support for data: URIs (#59) Apr 26, 2017
tmp move to PhantomJS Mar 2, 2013
.jshintignore cleanup in .jshintrc files, give rasterize.js its own .jshintrc file Nov 24, 2013
.jshintrc Support for data: URIs (#59) Apr 26, 2017
npm-shrinkwrap.json 2.0.0 Feb 7, 2017
open.js iterate front page Feb 21, 2014
package.json Revert "bump nodejs and npm" May 12, 2019


Generate PDFs from any web-page. You need Node.js to run it.

See it in action at:

Works out of the box on both Windows and Ubuntu. On Mac you need to:

brew install phantomjs

To get started you need to clone the repository, cd to it and run:

npm install

Running webserver locally

node open.js

This also opens your web-browser pointing to your locally running

Running webserver

node .

If you want to host yourself, you will have to ask your host if they support hosting Node.js applications.

If your host does not support Node.js, you'll need to find a new host that does. Check out Heroku or Nodejitsu for example.

Running tests

npm test

Page breaks

You can use the CSS attribute:

page-break-before: always;

Data URIs

You can use data URIs like the following to generate PDFs for arbitrary HTML:


As described on Wikipedia, the data URI should have the following format:

data:[<media type>][;base64],<data>



You can’t perform that action at this time.