Printer extension library overview for Windows Store device apps
This topic introduces the printer extension library, a library that helps device manufacturers write Windows Store device apps for their printer. The printer extension library is included with the Print settings and print notifications sample, and also the Job management and printer maintenance sample.
A high level design goal for the v4 printer driver architecture was to provide built-in support for the Windows Store app user interface. To provide access to the printer, the v4 print driver exposes COM-based Printer Extension Interfaces.
To access those interfaces from your Windows Store device app, you can use the printer extension library that is included with the Windows Store device app printer samples. The printer extension library wraps the COM implementation of the COM interface
PrinterExtensionLib. This enables code sharing between printer extensions and your Windows Store device app.
Within the PrinterExtensionLibrary project that is included with the printer samples, there are two C# files. These files wrap the contents of PrinterExtensionLib. But additional classes could be added at this layer in order to enable code sharing between printer extensions and Windows Store device apps .
PrinterExtensionTypes.cs specifies a number of helpful enumerations, constants and interfaces that wrap the COM PrinterExtensionLib APIs.
PrinterExtensionAdapters.cs specifies all of the constructable classes used to wrap the COM PrinterExtensionLib APIs.
You can augment this project with any necessary C# files that describe common model layer code necessary to build your printer extension and/or Windows Store device app. However, we don't recommend updating the existing classes, as this will make it more difficult to incorporate any bug fixes that made available through updates to the samples.
An additional project named DeviceAppForPrintersLibrary, provides helper classes and methods for C# apps that you can use to access printers from your Windows Store device app.
PrinterNotificationHelper.cs demonstrates how to show toast UI for notifications.
- Developing v4 print drivers
- Printer Extension Interfaces (v4 Print Driver)
- Job Management (v4 Printer Driver)
- Device Maintenance (v4 Printer Driver)
- Bidirectional Communications
- Getting started with Windows Store apps
- Create a Windows Store device app (step-by-step guide)
- Create device metadata for a Windows Store device app (step-by-step guide)