hi, you could try including the svg document as a stream from a servlet and refering 
this servlet in the src attribute. Something like this:

<fo:external-graphic src="/servlet/image/chart" content-type="content-type:image/svg"/>

This works for me.


-----Original Message-----
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 4:09 PM
Subject: Re: pluggable on-the-fly image generation

Keiron Liddle checked in a MathML extension yesterday that does almost
the same you're doing. He uses a tool that converst MathML to SVG. Have
a look at the current CVS (in the contrib directory).

On 24.04.2002 20:33:47 Paul Reavis wrote:
> I've got a mapping application where I'm generating a report with a
> plot of the map. Currently I'm using Batik's SVGGraphics2D to do the
> plotting, which is certainly easy enough, and then saving that to an
> SVG file, writing an FO file that references it as an external graphic
> and then run FOP to generate the PDF.
> This works fine, but uses a ton of memory - we frequently run over the
> default 64MB java heap limit, and we try to run on machines with only 64MB
> total...
> So, I'm looking at alternatives. Both Batik and FOP are hoggish, but a
> lot of the cranking and grinding seems to be in writing the SVG to a
> DOM and then saving it, then in reparsing the SVG back into DOM and
> writing that (transcoding?) to PDF. Also it looks like in 0.20.3 at
> least it reads the SVG twice, once to get its sizing, and once to get
> the actual graphics.
> Anyway, I noticed that there is a PDFGraphics2D implementation as well. What
> I'm considering is an implementation of FopImage that references a
> callback to draw the graphics from my map display during PDF
> generation itself - presumably this would avoid the entire SVG
> write-read cycle, and perhaps eat up less memory. 
> Does this seem reasonable? Just from poking around in 0.20.3 it looks
> like I would just need implementations of FopImage and ImageReader;
> ImageReader to report sizing etc. and FopImage to do the actual
> rendering. I'm of course assuming that PDFGraphics2D will do what I
> want - which is, at the point at which the graphic is to be written to
> the PDF, allow me to use standard Java graphics commands to write it. 
> One area I got totally lost in was in how to register this
> implementation with the FopImageFactory or whatever so that it would
> get called correctly. Any help on this would be appreciated.
> Thanks-
> -- 
> Paul Reavis                                      [EMAIL PROTECTED]
> Design Lead
> Partner Software, Inc.                        http://www.partnersoft.com
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

Jeremias Maerki

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to