How to set default printer in the print preview dialog progammatically

Ashok Kumar Viswanathan 71 Reputation points
2021-02-24T11:26:52.23+00:00

In UWP platform , print previewer dialog's windows shows printer options with default printer name(Printer which is set as default in system settings manually).

Is there any other way to change the default printer programmatically in UWP Platform, so that we can display our defined printer name in print preview window, instead of changing it manually.

Note : No need to change the default printer or select the printer in print previewer window manually. We need them to be done programmatically.

Developer technologies | Universal Windows Platform (UWP)
Developer technologies | Windows Presentation Foundation
0 comments No comments
{count} votes

Accepted answer
  1. AryaDing-MSFT 2,916 Reputation points
    2021-02-25T09:53:21.78+00:00

    Hi,

    Welcome to Microsoft Q&A!

    I have tested the SetDefaultPrinter method mentioned on the Internet, it doesn’t work in uwp app. In addition, I have searched api under the Printing namespace, there is no such api which can be set to changed the default printer.
    So currently uwp doesn’t support to change default printer. If you do want this feature, please feel free to submit your feature requirement with Windows Feedback Hub app.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.