I’m using the folliwing code to save the pdf file
private void printReport(string currentIdentityFullName, string cecBodyName, string examName, string approverName, string providerName, string cecPoints, string approverImageFile, string resultOfExam, string examDate, string score)
{
License license = new License();
license.SetLicense("Aspose.Total.lic"); //the license file is an embedded resource in the project
string approverImage = String.Format(Server.MapPath("~/images/corporates/{0}"), approverImageFile);
if (File.Exists(approverImage))
approverImageFile = approverImage;
else
approverImageFile = Server.MapPath("~/images/spacer.gif");
// Open the template document.
Document doc = new Document(System.IO.Path.Combine(Server.MapPath("~/Reports/"), "CECCertificateTemplate.doc"));
// Set up the event handler for image fields.
doc.MailMerge.MergeImageField += new MergeImageFieldEventHandler(mailMerge_MergeImageField);
doc.MailMerge.Execute(new string[] { "approverImageFile", "examName", "currentIdentityFullName", "cecBodyName", "providerName", "cecPoints", "examDate", "resultOfExam", "score", "ptnLogo" },
new object[] { approverImageFile, examName, currentIdentityFullName, cecBodyName, providerName, cecPoints, examDate, resultOfExam, score, Server.MapPath("~/images/pt_on_the_net.gif") });
doc.Save(currentIdentityFullName + examName, SaveFormat.Pdf, SaveType.OpenInWord, Response);
Response.End();
}
This works fine. But now the client wants to open the saved pdf in the new browser. Currently the document opens in a new tab for firefox and it opens in the same browser when I tried it in IE 7, 8. What is the easiest work around to overcome the issue?
THanks in advance