horstpeter: > OK, I know a lot of people had the same problem, but reading through forums > for 2 days now didn't help me at all. > I have a basic website with a svg embedded. The SVG has some JS in there for > the user to change the svg. I would love to have a button to export the svg > to a JPEG. > I already downloaded the batik package and put it on the server, I just > can't find the right way to call the rasterizer.
If you can run Java servlets on your server, then you can write a simple servlet that will do the rasterising. Here is a simple example: http://mcc.id.au/2007/09/batik-course/code/transcoding-servlet/ The actual code is in WEB-INF/classes/TranscodingServlet.java. That example servlet causes a URI with the following form to return a PNG: http://server/transcoding-servlet/transcode?uri=<uri-of-SVG-document> &width=<width-of-output-PNG>&height=<height-of-output-PNG> -- Cameron McCormack, http://mcc.id.au/ xmpp:[EMAIL PROTECTED] ▪ ICQ 26955922 ▪ MSN [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
