What I'm trying to do is get this to print in landscape mode without showing the dialog box. This is what I have so far:
((mshtml.IHTMLDocument2)Browser.Document.DomDocument).execCommand("Print", true, 0);
I know that the instruction to print in landscape mode needs to be sent through the third argument, but I don't know how to construct the third argument to do this. Can anyone give me some help on how to make this last argument accomplish my goal?
ADDITIONS: This is from Microsoft http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.defaultpagesettings%28v=vs.71%29.aspx
So you would probably just replace
pd
in the example above with your document.ORIGINAL ANSWER: Possibly integrate:
So maybe something like this:
Taking a little bit of a stab in the dark since C# is a weak spot but I believe this is how I once did it from an C# application.