rendersvg

Renders SVGs to PNG, GIF, JPEG, or PDF using PhantomJS

npm install rendersvg
10 downloads in the last week
23 downloads in the last month

rendersvg for Node.js

Renders SVGs using PhantomJS.

var rendersvg = require('rendersvg');

instream.pipe(rendersvg.renderStream([ext = 'png'])).pipe(outstream)
// or
rendersvg.convert(inbuffer, [ext = 'png'], function (err, outbuf) {
    // ...
})

Possible extensions:

  • png
  • gif
  • jpg
  • pdf

Requirements

OS X: brew install phantomjs

License

MIT.

npm loves you