Memory issues exporting JGoDocument as an image

‘Just wondering if there are any additional solutions for rendering a large JGoDocument as an image without memory issues. I am only able to render a JgoDocument as a Jpeg if it is smaller that about 4000 x 4000 pixels.

Attempting to render the JGoDocument as a raster image doesn’t seem to be very practical.

Does anyone have any solutions? Is there any way to render the JGoDocument as a vector image perhaps?

Any advice would be great. I expect other developers are / will experience similar issues.

Yes, trying to render documents as images can result in huge images; I guess your practical limit was 64MB.

Have you tried SVG?

import com.nwoods.jgo.svg.DefaultDocument;

DefaultDocument dom = new DefaultDocument();
dom.setGenerateJGoXML(false);
dom.setSVGTooltips(false);
dom.SVGWriteDoc(…, jgoView1.getDocument());

(I hope I typed in everything correctly.)

Hi Walter,

Thanks – I think this may be a viable solution. I tried using Batik to render a SVG image shortly after my last post. It worked, but my custom JGoObjects didn’t look quite right - the text seemed too large for the containers and exceeded the normal JGoArea bounds.

I just tried your suggestion of using the JGo DefaultDocument and, although my images didn’t render, it looks much better than the Batik results.

I’ll test the process using a very large document shortly, but I’ve got a good feeling about this approach.

I’ll let you know how it goes…

Thanks.