This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

node-render

1.1.1 • Public • Published

node-render NPM version Build Status Dependency Status Coverage percentage

This module allow to you render any string (specially html) using phantomJs.

Installation

$ npm install --save node-render

Usage

The new version used promises in instance of callbacks.

var nRender = require('node-render');
 
nRender.render(input, output, options);
nRender.renderToBuffer(input, options);
input = '<h1>Any string</<h1>'
options = null || myOptions // where myOptions is a object
output = '/path/to/my/output/file'
defaultOptions = {
    paperSize: {orientation: 'portrait', format: 'A4'},
    viewportSize: {width: 9921, height: 14031, margin: '0px'},
    onConsoleMessage: undefined,
    quality: 100,
    format: 'pdf', // if you are using renderToBuffer this is PNG
    root: '/'
  };

License

MIT © Alex Matos

Package Sidebar

Install

npm i node-render

Weekly Downloads

1

Version

1.1.1

License

MIT

Last publish

Collaborators

  • npm