xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Tosovsky" <j.tosov...@tiscali.cz>
Subject Creating an image on the fly from a servlet
Date Sat, 20 Feb 2010 22:17:43 GMT
Hello Everyone,

 

I am trying to rasterize svg files in a servlet using the Batik transcoder:

  

   response.setContentType("image/png");

   TranscoderOutput output = new
TranscoderOutput(response.getOutputStream());

   t.transcode(input, output);

 

Although I can see the result in the target browser, I am unable to save the
image on a local disk. Actually, in Firefox I can notice an attempt to save
the file, but in a download manager it is of zero size and it is not really
present in the target location. MSIE offers me save the PNG file in BMP
format...

 

PDF output is Ok. But in this case the result is opened in a browser using
Acrobat plug-in.

 

I've found an article about similar issue
http://www.jguru.com/faq/view.jsp?EID=159 and I think I am not too far from
it. I prefer creating files on the fly to avoid saving temporary files
somewhere on the disk with all the consequences (unique paths, deleting).

 

But this is my first web app so it is possible I am missing something. 

 

Any tip is appreciated.

 

Regards,

 

Jan


Mime
View raw message