Printing in landscape from a Windows Forms WebBrowser control
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)"
精彩评论