xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ionut Ciocirlan" <ionut.ciocir...@avandor.com>
Subject unknown size of svg
Date Wed, 17 Aug 2005 06:03:03 GMT
Hi list,

My first post on the list, and my first big issue: I have a 'dynamic' SVG
that I want to rasterize, and I can't find the right way to set its height
prior to rasterizing.

The thing that makes its height dynamic(unknown) is a flowText element, that
i managed to render entirely by setting the flowRegion/rect's width and
height to 100%.
For the moment, i also set the root svg's height to 100% too. This manages
to get all the content of the flowText element, but sets the actual height
of the document to 400px.

What I need is some directions to solving this; further premises:

1) although i'm using the transcoder API, I'm limited "language-wise",
because i'm running everything via a php-java bridge, so I can't use syntax
such as svgComp.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
.... }; this basically means no listeners for me, but just calling methods
and getting/setting properties. Besides that, my Java skills are limited.

2) if the line above shows I'm looking at the very wrong thing in the docs
(http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/JSVGComponent.html)
then please point me in the right direction

3) my prefered choice would obviously be to do this from ECMA scripting, or
any other way that could just be contained in the SVG file.
After reading the SVG DOM implementation status docs, it doesn't seem to be
possible simply by means of ECMA/DOM, but i have a feeling that this might
be done by scripting Java ( <script type="application/java-archive" />), yet
I didn't quite get this. Any help / pointers / example code highly
appreciated.

4) if it *is* possible from the svg file, I still have to find out how
(API-wise)

5) if not, then i'll have to package my own jar that i could use from the
php-java bridge; still have to find out how it's done purely in java

6) if it's entirely not possible, then I have a problem, and looking for
alternative solutions to rendering stuff whose height i don't know from the
beginning.


Thanks,
Ionut


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message