I use the code below to download image directly but I need to put it in word doc and want to download the doc.
response.contentType = "application/octet-stream"
response.setHeader("Content-disposition", "attachment;filename=image.jpg")
response.outputStream << inputstream
response.outputStream.flush()
Can anyone know how to add an image to word document and download using grails?
Any help is appreciated. Thanks
I use http://blogs.bytecode.com.au/glen/2010/11/04/creating-word-docx-documents-dynamically-from-grails-or-java.html and http://blog.iprofs.nl/2012/10/22/adding-images-and-layout-to-your-docx4j-generated-word-documents-part-1/ to solve my code so I use docx4j for inserting image into word document using grails.
Thanks