Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1394
  • Last Modified:

c# set printer to print WebBrowser to

I have a webbrowser control on my form and I would like it to print to the Microsoft XPS document Writer automatically at a click of a button without the user having to change default printers using C#.

Can this be done?
Thanks
0
Dave Fyfe
Asked:
Dave Fyfe
1 Solution
 
Dennis AriesCEO @ Arkro ITCommented:
As far as I know, you cannot do this. There are several reasons, but they all revert back to being a security-related issue.

0
 
enkorCommented:
not possible in web page project
0
 
lluddenCommented:
If you are hosting a webbrowser contol in a WinForms form, you can change the default printer through API function calls

http://msdn.microsoft.com/en-us/library/dd162971%28v=VS.85%29.aspx

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now