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?
Dave FyfeTechnicianAsked:
Who is Participating?
lluddenConnect With a Mentor Commented:
If you are hosting a webbrowser contol in a WinForms form, you can change the default printer through API function calls


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.

not possible in web page project
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.