I am generating PDF document using iText API in Java. It is running fine on Mozila and MSIE. But when I am removing,
response.setHeader("content-disposition: attachment", "inline; filename=myFile.pdf");
this part of code from my servlet it is running fine on Chrome as well. But as soon as I add this code and try to run it on Chrome it is giving me error saying 'Failed to load PDF document'.
I need to use above part of code in order to give dynamic name to each PDF generated. How could I achieve this?