Hi Sudhakar,

Sudhakar S <[EMAIL PROTECTED]> wrote on 07/31/2006 08:40:17 AM:

> > Well you can do what ever you want when you export the document 
> > to an SVG file.  You can do a deep clone of the document and modify 
> > the clone before writing it to disk. 
> 
> Actually my SVGDocument contains some SVG image elements which was 
created
> dynamically using 'createElementNS(SVGGraphView.SVG_NS, "image")' with
> "xlink:href" attribute without base64. But while exporting into SVG 
file, my
> SVG image elements must be saved using Base64EncoderStream. Then only
> exported .svg file will contain all the depended image elements.

> So should i change all the image elements with base64 in cloned document
> before exporting into svg? 

    I don't think Batik supports Base64 encoded SVG images.  So I would
suggest replacing the 'image' element with an 'svg' element (or perhaps
better a use element) and append the contents of the reference SVG image 
to the 'svg' element (or a 'symbol' element you construct in the defs). 

    Alternately if you use the SVGGraphics2D to 'draw' your SVG document 
this will more or less happen automatically.

> or
> Is it possible to do anything in DOMUtilities.writeNode?

   If I understand the question properly, I don't think you will be
very successful making the kind of modifications you are talking about
making to the SVG document just in writeNode.  Some might be possible but
I think the code would get very complex and the sorts of replacements
you could do would be limited.  I think it might be possible to get 
something going based on that code but in the end I don't think it
would look much like the original code...


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

Reply via email to