I tried appending the root to the document as suggested:
...
Element root = graphics2D.getRoot();
document.appendChild(root);
document.insertBefore(pi,  root);

before and after the call to graphics2D.stream( writer, useCSS) 

and nothing got displayed. The code is in a simple servlet and I run it in
IE using the Adobe plug-in version 3.

The latest patch provided by Cameron works fine but if it's possible I'd
like to use the svggen.jar without custom modification and have the pi
included in the svg rendering. Any chance Cameron changes are going to be
commited to CVS?

Thanks

Daniel


-----Original Message-----
From: Thomas DeWeese [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 18, 2004 5:28 PM
To: Batik Users
Subject: Re: Adding a proccessing instruction

Hi all,

    This is a common misunderstanding The document you give
the SVGGraphics2D is not the document that is streamed it
is simply used as a factory for constructing the elements
of the independent document the SVGGraphics2D constructs
for it's self.

    So adding a PI to the document won't do any thing.
What you probably want to do is get the root of the
generated SVG tree and manually append that to the document
(with your PI).


Cameron McCormack wrote:

> Daniel Siino:
> 
>>this used to work. Any ideas what could be the cause?
> 
> 
> In SVGGraphics2D.stream(Element, Writer, boolean) try changing the line
> 
>   svgDocument.appendChild(n);
> 
> to
> 
>   svgDocument.appendChild(svgRoot);
> 
> Cameron
> 


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

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

Reply via email to