Hardware Dev Center

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.

Printer extension library overview


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.


In order to convert the C# interfaces, classes and methods to something supported in JavaScript, this project will create a WinMD file. WinMD files specify Windows Runtime APIs. Additionally, this library can be used to expose convenience objects that are specific to the Windows Store device apps, such as parsing out different activation contexts, or creating toast UI for notifications.

  • PrintHelperClass.cs includes the PrinterExtensionLibrary namespaces in order to expose them to JavaScript layers in the app. It also includes some convenience methods for PrintTicket and Bidi.

  • PrinterNotificationHelper.cs demonstrates how to show toast UI for notifications.

Note  The Output type for the PrinterExtensionHelperLibrary assembly is specified on Application page of the project properties window.

Related topics

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)



Send comments about this topic to Microsoft

© 2015 Microsoft