In my asp.net 4.0 application I have a word document residing on the back end. When the user choses to print a letter, using ASPose I am filling in the mail merge fields behind the scenes,
I am opening a browser window and displaying a PDF via the code below in Page_Load. I would like to tell it to print so that it opens up the standard Printer Dialog, prints if the user says to do so, then closes that browser window. How can I invoke the print (local printer) from this point?
using (FileStream sourceStream = new FileStream(pdfFilePath, FileMode.Open, FileAccess.Read))
{
using (var memoryStream = new MemoryStream())
{
sourceStream.CopyTo(memoryStream);
byte[] b = memoryStream.ToArray();
Response.AddHeader("content-disposition", "inline;filename=" + Path.GetFileName(pdfFilePath));
Response.ContentType = System.Net.Mime.MediaTypeNames.Application.Pdf;
Response.OutputStream.Write(b, 0, b.Length);
}
}