rendersvg

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

npm install rendersvg
2 downloads in the last day
3 downloads in the last week
25 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