title: How to add an image to word document and download using grails?
body: <p>I use the code below to download image directly but I need to put it in word doc and want to download the doc.</p>
  
  <pre><code>        response.contentType = "application/octet-stream"
          response.setHeader("Content-disposition", "attachment;filename=image.jpg")
          response.outputStream &lt;&lt; inputstream
          response.outputStream.flush()
  </code></pre>
  
  <p>Can anyone know how to add an image to word document and download using grails?</p>
  
  <p>Any help is appreciated.
  Thanks</p>