How do I programatically change printer settings with the WebBrowser control?
I finally figured out how to print transformed XML without prompting the user or showing an IE window, but now I need to specify a number of copies and possibly other printer settings.
Is there a way to programatically change printer settings on a WebBrowser control?
The code in question:
The only method I’ve had success with is modifying the registry on the fly (and changing them back to not affect anything else).
You can find the settings you need at “SoftwareMicrosoftInternet ExplorerPageSetup” under CurrentUser.
To change the printer, you can use this:
As for the number of copies, you can always put the WebBrowser.Print in a while loop.