javascript - Programatically generate PNG from Raphael.JS image -
I am writing an app that allows users to generate images with Raphael. JS
- User input parameters
- We generate a JS wrapper that calls above and calls. HTML on Container design, giving us SVG (which we send back somewhere)
- We execute JS wrapper
- SVG is sent to Image Magazine and a PNG pop out
Li> We Generate
In step 4, I need some guidance. I can use IE; We have no guarantee that JS is ever executed in SVG Browser. In any case, we must be reliable for it to run the server-side so even if there are three possibilities with me:
- Install Firefox on the server and Firefox Run the result of (3) in This option is useless because installing FF means installing a bunch of X accessories on our servers means running FF runs a lot overhead, and I really do not want to kill it with tracking this process and killing it. Use
- Node.js + jsdom () The result here is that it is not clear how the support is being supported - the alleged site, jsdom.org, does not actually exist. Besides, I can not find any documents.
- Maybe do something with Rhino? As far as I can tell, there is even less DOM support than the node in Rhino.
So ... I suck three types of all those options I think. Am I wrong about something? Is there any other way?
Resolve it with wkhtmltoimage, ugly solved, but it works.
Comments
Post a Comment