[英]Printing in landscape from a Windows Forms WebBrowser control
I have a WebBrowser control in a Windows Forms Host in a WPF application.我在 WPF 应用程序中的 Windows Forms 主机中有一个 WebBrowser 控件。 I know that in order to print it's contents, I use simply
WebBrowser.Print()
, however, how can I tell the printer to print the contents in landscape rather than a portrait orientation?我知道为了打印它的内容,我只使用
WebBrowser.Print()
,但是,我怎样才能告诉打印机以横向而不是纵向打印内容? I've been searching the Internet on this and oddly enough, it seems to be actually something that is a bit hard to do -- is this really the case?我一直在网上搜索这个,奇怪的是,这似乎实际上有点难以做到——真的是这样吗? It seems odd to me that it wouldn't be easily implementable.
对我来说这似乎很奇怪,它不容易实现。
Thanks!谢谢!
INFO: WebOCHostCSharp.exe Hosts the WebBrowser Control in C# .NET信息:WebOCHostCSharp.exe 在 C# .NET 中托管 WebBrowser 控件
http://support.microsoft.com/kb/326217 http://support.microsoft.com/kb/326217
The Print(String) method prints a document and does not display a dialog box. Print(String) 方法打印文档并且不显示对话框。 This method uses a Microsoft HTML (MSHTML) print template to automatically control print options such as paper size, orientation , and number of copies.
此方法使用 Microsoft HTML (MSHTML) 打印模板来自动控制打印选项,例如纸张大小、方向和份数。
Note: This project does NOT contain this mystery overloaded method "Print(string)", It's actually called "PrintFormatted(string)"注意:这个项目不包含这个神秘的重载方法“Print(string)”,它实际上被称为“PrintFormatted(string)”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.