I am using Spring + ExtJS and need to 'export to' functionality on UI screen. I am making an Ajax call and sending the data in JSON format to controller. In controller I am doing all stuff to generate the PDF using iText and it does generate the document.
Now I am not seeing the generated PDF to downlaod/view in browser. If I do it without Ajax call, it works. Not sure whats making the difference.
I read few related articles around this which suggested to use below :
Content-type: application/pdf
Content-Disposition: attachment; filename="FileName.pdf"
But no luck with this. Please advice on this/let me know if going wrong.