Hi Nacho, Thomas,
I have been playing around in order to find a solution
to this problem, which I have, so far, not
encountered, but I have made a few observations which
I would like to share:
In theory, I would picture the "printing with
rendering transform" as the following sequence:
1) Retrieve the viewBox of the SVG document, i.e. a
rectangle which spans the whole SVG document.
2) Retrieve the renderingTransform of the
JSVGComponent (or whatever else one is using).
3) Compose both to obtain a viewBox on which the
renderingTransform is applied this is the area of
interest.
4) Give the printTranscoder the hints related to the
area of interest and transcode.
In practice, I am stumbling over steps 1 and 3.
Nacho, in your code, I don't understand why you are
doing Rectangle canvasRectangle =
svgCanvas.getBounds(); Afaik this gives you the bounds
(width & height) of the _component_ as it is laid out
on screen, not of the SVG content of the component
i.e. the width and height will be the size of the svg
canvas component as it is laid out on screen! As
Thomas has stated, I guess this is where the confusion
about what is the area of interest comes in. I further
guess that we both want a rectangle which gives
coordinates within the viewBox (or simply the viewBox
itself). In the files I am using, the viewBox is
actually a noop (exported from Visio, has attributes
such as height="55.3642in" width="73.8189in"
viewBox="0 0 5314.96 3986.22"). I could not figure out
a way how to do it. Then, I also don't understand why
there is a need for inverse transforms (because I
simply don't know much about computer graphics in
general, so this information might be totally
irrelevant)... I did, however, uncomment that part,
and printing without the inverse transforms applied at
least prints something (and not a white sheet of
paper), though I not the current renderingTransform of
the SVG document.
I just wanted to share these observations. Help would
be, in any case, greatly appreciated.
Thanks,
Chris

Chris Cruzdal
__________________________________
Do you Yahoo!?
Yahoo! Search  Find what you’re looking for faster
http://search.yahoo.com

To unsubscribe, email: batikusersunsubscribe@xml.apache.org
For additional commands, email: batikusershelp@xml.apache.org
