Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (21 sloc) 881 Bytes

Renderize

A web service for rendering markup and styles as images through PhantomJS.

Installation

Ensure that NodeJS is installed. This has only been tested on NodeJS versions 0.10.x and higher.

Install the script's dependencies with npm:

npm install .

You should now be able to run the project like so:

npm start

Usage

The API is simple to use. It listens at / on port 9040, and expects you to send it a POST body containing the HTML markup for the body of the document which you would like rendered. The following extra options are supported:

  • styles, for any stylesheet rules you may want included.
  • width, to request a specific width for the output.
  • height, to request a specific height for the output.
  • format, to request a specific format for the output. (default: PNG)