How To use Rendering plugin in grails -


i using rendering plugin creating pdf.. plugin working fine.. butenter image description here

when click on download pdf.. rendering me page

![enter image description here][2]

and gives me result in pdf format..

and gives me option save![enter image description here][3]

but wanted.. when click on download pdf button(image 1) .. show me direct save window (image 3) rather rendering me page..

sorce code :

def renderformpdf(long id){         def empinstance= emp.get(id)         renderpdf(template:"view", model:[empinstance:empinstance, pdfrendering:true])      } 

try this

def renderformpdf(long id){     def empinstance= emp.get(id)      response.setcontenttype("application/pdf")     response.setheader("content-disposition", "attachment; filename=filename.pdf")      renderpdf(template:"view", model:[empinstance:empinstance, pdfrendering:true]) } 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -