You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Larry Ai <la...@yahoo.com> on 2003/07/01 14:39:09 UTC

batik document object

All:

 

    I used batik API to convert my image to SVG format
and then include that image in the pdf document.

 

    There are two approaches:

 

1)       draw the image and use
SVGGraphics2D.stream(..) to output the image in SVG in
a temp file

then in the xsl file, I would say:

 

<xsl:apply-templates select=�document(�temp.xml�)�/>

    

         This approach works fine but I don�t want to
create a lot of temp files. 

 

2)       I will let the batik method to return a
Document object and in my xls file I will say:

 

<xsl:apply-templates select=�document(document
object)�/>

 

In my batik method, 

 

          document = domImpl.createDocument(null,
"svg", null);                   

          g2d = new SVGGraphics2D(document);

 image.paint(g2d);

return document;

 

I assume that the document object will hold the entire
tree of the SVG representation of the image.

 

But it does not work! Anyone can provide pointers?!

 

Thanks!

 

Larry

 



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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