Hi Patrick,
Mclean, Patrick wrote:
When I use the transcoder to convert an svg file to a jpeg it only converts part of the file. The svg file is created using batiks
generator and Iam able to view the complete image using squiggle or embedded in a web page. Can anybody tell me why it is only selecting
part of the file and how to fix this problem?
This is usually caused by not having width and height attributes on the svg element. You can have the generator provide these by calling 'setSVGCanvasSize' before you stream out the document. Without a viewBox or w/h attributes there is no way for the rasterize to know what region of the infinite canvas to rasterize, so it arbitrarily picks 0,0,400,400.
I tried using the addTranscodingHint to change the width and height, but this doesnt give me any more of the image, it just changes the size of the image that is available.
I think you are looking for the '-a' output area flag (or area of interest, AOI, hint) that allows you to specify what section of the infinite canvas you want rendered. Really though setting the width and height and/or viewBox on the SVG is the right thing to do.
I have seen some comments about viewBox, but can't find much info on it, if this is where I should be looking.
I would suggest looking at the SVG specification for information on what the SVG attributes do.
Also does anyone know if their is a manual/tutorial available for batik that might cover this?
There are some small tutorials on Batik in the web site but they are generally the get you started variety. It would be great if someone would write more detailed ones. I'd gladly answer questions if needed.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]