Exporting to svg is no problem.
For export to JPG, TIF and PNG, i first create a temporary svg file and then transcode that file to one of those formats. What seems to be the problem: the svg file doesn't have width or height attributes. Displaying a 1000*1000 svg file is no problem, but when I transcode it, it clips the image to the upper left 400*400 pixels.
Is there a way to solve this?
Hi Brecht,
Yes, simply call 'SVGGraphics2D.setSVGCanvasSize(Dimension sz)' with the desired size of the SVG (in your example 1000,1000):
SVGGraphics2D svgGenerator = new SVGGraphics2D(ctx, false); svgGenerator.setSVGCanvasSize(new Dimension(1000, 1000));
Also you don't have to write the temporary file. You can hand the transcoders a document in memory (It's one of the accepted types for InputSource) - this saves the time of writing the SVG and then reparsing it.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]