I'm using Raphael js to create some graphics on the client. But I'd now like to be able to do the same thing directly on the server to be able to create them and store them in batch.
I've found solutions where the SVG form Raphael is fetched from the client, but not any completely server-side.
Does any one have exp开发者_Python百科erience using Raphael js server side only (with Rhino for instance)?
Thanks!
Take a look at PhantomJS - it's basically a full webkit browser you can run headless from the command line and render the output to a PNG.
There is actually an example using Raphael on the Quickstart guide.
phantomjs rasterize.js http://raphaeljs.com/polar-clock.html clock.png
精彩评论