> 
>     What are you passing into the rasterizer?
>     A URL or an input Stream?
> 
>     Can you post the code you are using to invoke the rasterizer.
> 
>     I'm 99% certain that you are sending in a stream (that would
> go back to the client in the SVG case).  In this case you need to
> associate a URL with the stream.  The TranscoderInput class has
> a whole bunch of inputs it accepts,  if you are passing in an
> Input Stream you should also call 'setURI' with an appropriate
> URI which can be used to resolve the references to your JPEG images.
> 

Here's the code for your perusal:

public void sendSVG(HttpServletRequest request, HttpServletResponse 
response, String svgString){
            headerInfo(request, response, "image/svg+xml");
            try{
                response.getWriter().write(svgString);
                response.getWriter().flush();
               }
            catch(Exception e){
                e.printStackTrace();
               }
          }

public void sendJPG( HttpServletRequest request, HttpServletResponse 
response, String svgString){
                headerInfo( request, response, "image/jpeg");
                JPEGTranscoder t = new JPEGTranscoder();
                t.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, new 
Float(.9));
                TranscoderInput input =  new TranscoderInput(new 
StringReader(svgString));
                try{
                        TranscoderOutput output = new TranscoderOutput
(response.getOutputStream());
                        t.transcode(input, output);
                        response.getOutputStream().close();

                }
                catch(Exception e){     
                        e.printStackTrace();
                }
        }

Thanks,
Ravi





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to