UWP device apps for printers
This section introduces UWP device apps for printers. UWP device apps can highlight the special features of printers through customized print settings flyouts and notifications support. UWP device apps can also display printer status, manage print jobs, and perform printer maintenance tasks. To learn more about UWP device apps in general, see Meet UWP device apps.
Important To use UWP device app features, your printer must support the v4 print driver model. For more info, see Developing v4 print drivers.
In this section
This topic uses the C# version of the Print settings and print notifications sample to demonstrate how to query the printer status and display it.
This topic introduces the advanced print settings flyout, and shows how the C# version of the Print settings and print notifications sample replaces the default flyout with a custom flyout.
This topic introduces print notifications, and shows how the C# version of the Print settings and print notifications sample uses a background task to respond to print notification. The background task demonstrates how to save notification details in the local app data store, send toasts, and update a tile and badge.
In Windows 8.1, UWP device apps for printers can manage print jobs. This topic uses the C# version of the Print job management and printer maintenance sample to demonstrate how to create a view of print jobs, monitor those jobs, and if necessary, cancel a job.
In Windows 8.1, UWP device apps can perform printer maintenance, such as aligning print heads and cleaning nozzles. This topic uses the C# version of the Print job management and printer maintenance sample to demonstrate how bidirectional communication (Bidi) can be used to perform such device maintenance.
This topic introduces the printer extension library, a library that helps device manufacturers write UWP device apps for their printer.
Should I create a UWP device app for my printer?
Use a UWP device app for a printer if you'd like to:
- Highlight advanced device capabilities, such as printing multiple photos per page.
- Make device-specific recommendations. For example, you could use your device app to present image management options or provide methods for setting and saving printer-specific defaults.
- After you call window.print(), check for and handle error messages from within the onClick event handler for your app's Print button. This allows your app to abort a print request if, for example, no printer is available.
- Notify the user if printing fails and, if possible, explain the reason for the failure.
- If you plan to customize the print experience, separate this code into a print companion app. This allows you to componentize your code and eases the test and debugging process.
- Don't try to customize your print experience to use the V3 print driver.
- Don't advertise accessories for the print device in your customized print UI.
- Don't show items for sale that aren't related to the reason the Microsoft Store device app was invoked. For example, it's relevant to show print cartridges for purchase after a user clicks a notification alerting them that ink is low. However, it's not appropriate to also try to sell print cords or photo printing kits in this same scenario.
- Don't redirect the user to your company’s website for more product sales.
- Don't present information that isn't relevant to the task of setting printing preferences. For example, don't provide info about how to clean the print heads or how to align and test the print nozzles.
The UWP device app samples for printers demonstrate the printer-related features that you can implement in your own UWP device app. Each sample also includes the
PrinterExtensionLibrary project, that you can reuse in your own app to help with printer extensions. The printer extension library wraps the COM implementation of the printer extension interfaces from the v4 print driver.
The Print job management and printer maintenance sample demonstrates how to manage print jobs and perform printer maintenance tasks using bidirectional communications (Bidi).
The Print settings and print notifications sample shows how to create a UWP device app that provides a customized flyout for advanced print settings, can display printer status, and can display printer notifications in tiles or toasts.