I am using iTextSharp to write my data to the template file. The PDF document is then rendered using MemoryStream in C#.
Everything works as expected with Google Chrome and partially with firefox.
var document = new Document();
//document open and content settings are done here
document.AddTitle("My Document Title"); //Statement-1
document.AddHeader("content-disposition", "inline;filename=MyFileName.pdf");
Google chrome shows the title as "My Document Title" and when downloading, it sets the file name as "MyFileName". The same is not the case with IE and Firefox.
IE displays the site name as title and is assigning the query parameters as file name. Firefox also has a random behavior. Even javascript (window.open settings) does not work. I want the browsers to display the same title and file name as Google chrome.
Please guide if I have missed any important steps to normalize the title and file name across browsers.