开发者

Printing in landscape from a Windows Forms WebBrowser control

开发者 https://www.devze.com 2023-03-12 09:37 出处:网络
I have a WebBrowser control in a Windows Forms Host in a WPF application. I know tha开发者_运维技巧t in order to print it\'s contents, I use simply WebBrowser.Print(), however, how can I tell the prin

I have a WebBrowser control in a Windows Forms Host in a WPF application. I know tha开发者_运维技巧t 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? 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

http://support.microsoft.com/kb/326217

The Print(String) method prints a document and does not display a dialog box. This method uses a Microsoft HTML (MSHTML) print template to automatically control print options such as paper size, orientation, and number of copies.

Note: This project does NOT contain this mystery overloaded method "Print(string)", It's actually called "PrintFormatted(string)"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号