Page 1 of 1

Urgent: Output Stream Rendering to browser

PostPosted: Sat May 29, 2010 7:11 am
by docuser1
How do I stream the wordMLPackage to outputstream? My requirement is quite simple i.e. to render the generated doc in browser without having to store and read the file from the disk.

Many thanks for your help!!

Re: Urgent: Output Stream Rendering to browser

PostPosted: Sat May 29, 2010 11:31 am
by jason
Given a WordMLPackage p and HttpServletResponse res:

Code: Select all
res.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");

SaveToZipFile saver = new SaveToZipFile(p);
      
saver.save( res.getOutputStream() );

Re: Urgent: Output Stream Rendering to browser

PostPosted: Wed Jun 02, 2010 8:08 am
by docuser1
thanks! it worked.