我有HTML
从 SSRS 检索到的 byte[] 文档,我想以C5
横向表示的纸张格式打印它。我使用 IE 进行打印,但我不知道如何告诉他以横向 C5 模式打印我的文档。建议?
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);