I am currently struggling with a side project I hope you can help me with.
I am trying to convert SVG images to JPEG with PHP4.
Originally I tried to interface java with php via the php_java.dll and jar that comes with PHP 4.2.2 but while I never got any warnings I never managed to get even the simplest test working. All text regarding it is for JDK1.4 and an article on setting it up on O'Reilly website is for JDK1.2. That would of enabled me to use Batik.
So I then looked harder and saw cryptic references to using PHP:GD to convert SVG to JPEG. GD seems to be able to load and save JPEG, PNG, GIF, etc, but not SVG directly. GD seems to use a vector graphics format but not entirely sure if it is SVG compatible (I am a noob to both).
I did find a Perl GD::SVG module, but obviously requires Perl - and considering the problems I had with PHP<->Java I am loathe to go that route.
I also found a site (which I can't find now) that discussed speed of various SVG conversions with rsvg, Cairo and a couple of others. Talking of applications converting SVG to JPEG, people also discuss ImageMagick. While that might work on the linux box that is the server, I do 99% of my development in Windows - hence prefering a pure PHP solution and not wrestling with differences between applications on different platforms.
I am now considering writing a SVG->GD converter. The final alternative is to use SVG in the browser via Raphael. I'd rather convert to JPEG on the server and serve the image normally.
Has anyone had any use of SVG->GD, know of any OS (but not GPL) convertors or have any better ideas?