I have HTML
document as byte[] retrieved from SSRS and i want to print it in C5
paper format in landscape representation. I use IE for printing, but i don't know how to tell him to print my document in landscape C5 mode. Suggestions?
var envelope = proxy.Render(
Format, DevInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
using (FileStream fStream = File.Create(string.Format(@"printtmp\envelope_{0}.html", i)))
{
fStream.Write(envelope, 0, envelope.Length);
}
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, string.Format(@"printtmp\envelope_{0}.html", i));
var ie = new InternetExplorer();
ie.PrintTemplateTeardown += disp =>
{
File.Delete(path);
ie.Quit();
};
ie.DocumentComplete += (object disp, ref object url) =>
{
ie.ExecWB(OLECMDID.OLECMDID_PRINT, OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, Type.Missing, Type.Missing);
};
ie.Navigate(path, Type.Missing, Type.Missing, Type.Missing, Type.Missing);