You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Claus Bech Rasmussen - TELMORE <cb...@telmore.dk> on 2004/10/06 11:01:43 UTC
SVG2PNG
Hi all,
So I see all over the place that Forrest will convert SVG to, say, PNGs
on the fly if I simply drop it in a certain folder. I just don't seem to
find an explanation anywhere? I guess it's obvious if you know how, but
where can I find instructions of how this is actually done?
Can I get to the point where I just point to SVGs in my documents and
automagically they'll be converted when viewed on the web?
/claus
Re: SVG2PNG
Posted by Dave Brondsema <da...@brondsema.net>.
Claus Bech Rasmussen - TELMORE wrote:
> Hi all,
>
> So I see all over the place that Forrest will convert SVG to, say, PNGs
> on the fly if I simply drop it in a certain folder. I just don't seem to
> find an explanation anywhere? I guess it's obvious if you know how, but
> where can I find instructions of how this is actually done?
>
> Can I get to the point where I just point to SVGs in my documents and
> automagically they'll be converted when viewed on the web?
>
> /claus
Just put a .svg file in an images location (e.g.
src/documentation/content/mylogo.svg) and reference it with <img
src="mylogo.png">.
Forrest uses Cocoon to define what conversions will happen. The
svg->png conversion uses the Batik library.
--
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal
Re: SVG2PNG
Posted by David Crossley <cr...@apache.org>.
Claus Bech Rasmussen - TELMORE wrote:
> So I see all over the place that Forrest will convert SVG to, say, PNGs
> on the fly if I simply drop it in a certain folder. I just don't seem to
> find an explanation anywhere? I guess it's obvious if you know how, but
> where can I find instructions of how this is actually done?
Look at the document in your 'forrest seed' site
samples/samples.xml and search the source for "png".
If there is a matching filename.svg file in the
xdocs/images/ directory, then it is used for the
svg2png generation, otherwise forrest looks for
a matching pre-generated filename.png
However, be careful. There is an entry in our Issue Tracker
about some SVG document type declarations causing trouble.
--
David Crossley