Webbrowser printer settings

Is there a way to modify the printer settings when using the webbrowser.print() method I want to set these option without the user seeing the print setup dialog. I've tried all of the various registry "hacks" but they have never fully work correctly. I've been searching for a complete solution to this problem since 2001 and it seems like printing an html document with programatic control over the settings is impossible

Answer this question

Webbrowser printer settings

  • Dave#

    Wow. Im not sure I understand why microsoft would not give us the ability to print html in landscape mode to a specific printer without showing the print dialog.

  • P. van der Velde

     

    Well here's the reason.....

    The webBrowser control is a simply a COM object, part of IE, software "wrapped" in such a way that it's compatible with vs2005. It is not a separate object and really doesn't have any superset of features beyond IE.

    It isn't made for automation. It does have a command interface to set and read properties of many things. BUT it doesn't have independent properties  dealing with the printer that I know of..

    A list of command properties may be found here:

    http://msdn.microsoft.com/library/default.asp url=/workshop/author/dhtml/reference/constants/copy.asp

    and

    http://msdn.microsoft.com/library/default.asp url=/workshop/author/dhtml/reference/commandids.asp

     

     



  • Chad Boyd MSFT

    Most of the settings can be altered through registry hacks. The option I really need is landscape. It is really easy to show the print dialog but it is an extra step and unacceptable for automatic printing. The webbrowser control is really nice, I created a basic html editor using the dhtml commands that works very well. I just wish there was a way I could have a little bit more control over printing and it seems like there is no way to do it

  • GAHarlan

    I don't believe there is any way to automate this.



  • Matthew Stoecker

    WHen I consider the architecture... I realy don't think there is a way.



  • Webbrowser printer settings