I am using WickedPdf
respond_to do |format|
format.html
format.pdf do
render :pdf => "file_name"
end
end
This is working fine . the user is able to download the generated pdf . but i need to store the generated pdf in server for other purposes like mailing etc etc How can i save this generated pdf ?
i tried the following but no idea how to pass the html to wickedpdf wicked_pdf doesn't work -- Ruby on Rails
thanks in advance
You probably figured this out already, but I'm learning WickedPdf right now and just learned how to save directly in your controller in the respond_to block. There is great documentation on the Git page for this https://github.com/mileszs/wicked_pdf. Here's what I have in my controller for the show action:
This ends up saving it to a folder in my root called "pdfs" as the username.pdf. Hope that helps.