On Saturday, May 12, 2012 at 11:31 PM, Stephan February wrote:
> I finally managed to work around the bug, and can happily report that both Chrome and Firefox are now supported for SetupManual.
> The problem is that Chrome does not honor the xlink:href namespace. So when I send my SVG from the browser to the server for rasterization the server-side library crapped out 'cause of the broken SVG standards compliance in Chrome. I ended up manually patching the broken xlink: references in Javascript right before sending to the server, so everyone's happy.
i see, thx for the details.
> I'm using RaphaelJS for javascript SVG manipulations client-side, and Apache Batik server-side.
looks like it's a pretty common problem, that ppl want to rasterize stuff what's possible to produce w a browser, although browsers are everywhere, so theoretically it should not be necessary…
as i see the main reason is to wrap the used resources into 1 file, specifically pdf.
i think it's favored over any other solution, because it's definition is less open ended as html+css+xxx, so the output of the various implementations on the various platforms are not so different.
i almost said the other reason is pdf is more like data and not a program, but it's not entirely true, since its core is postscript, which is effectively a version of forth.
3rd reason might be to fix and map the layout to a specific physical paper size; which im not sure is always wanted actually…
4th reason comes from the fact it's just 1 file, so it's possible to encrypt and digitally sign it.
im summarizing so it might ignite other ppl's imagination and also to ask:
why do we need to use a different implementation on the backend for rendering from what we use on the frontend?
webkit is available on the backend too… phantomjs nicely wraps it and turns it into a command line tool effectively. just use the bundled rasterize.js example as is to generate pdf or png/jpg.
what's missing probably is an example how can we setup phantomjs as a web service with runtime and process count constraints. i can imagine this could be a little startup on it's own… similarly graphviz could be wrapped into a service… maybe it's time for me to sit down and jfdi...
--
tom