Save pdf file using javascript
-
I am using the javascript framework smartclient and IIS(Microsoft server), i install loacal jsreport. I send data to jsreport with smartclient and i cant find a way to save the response as pdf. The solution i have been found is to get response from jsreport as html with browser client with this code inside
jsreport.render({
content:document.documentElement.innerHTML,
engine:"handlebars",
recipe:"phantom-pdf",
phantom: {waitForJS: true }
}) ; , i write this response in html file then render it in new tab and when rendered produced the pdf in new tab. This is not good solution.
Any help?
Thanks in advance B.M.