desktop2:AppPrinter

Enables the ability to install software file printers in Windows Desktop Bridge apps.

Element hierarchy

<Package>

    <Applications>

         <Application>

              <Extensions>

                   desktop2:Extension

                        <desktop2:AppPrinter>

Syntax

<desktop2:AppPrinter 
    DisplayName = 'A string with a value between 1 and 256 characters in length. This string is localizable.'
    Parameters  = 'A string with a value between 1 and 32767 characters in length with a non-whitespace character at its beginning and end.' />

Attributes and elements

Attributes

Attribute Description Data type Required Default value
DisplayName The name for the printer queue. A string between 1 and 256 characters in length. This string is localizable. Yes
Parameters The file to print. The "%1" token can be used for the full path to the print file being passed into the app. A string between 1 and 32767 characters in length with a non-whitespace character at its beginning and end. Yes

Child elements

None.

Parent elements

Parent element Description
desktop2:Extension Declares an extensibility point for the app.

Examples

Here is a simple example of the syntax you might use to print to OneNote.

<Extension Category="windows.appPrinter"> 
    <!-- e.g. “Print to OneNote 2016” -->
    <AppPrinter DisplayName=”ms-resource:ONENOTE_PRINTER_NAME” Parameters=”/insertdoc %1”>  
    </AppPrinter> 
</Extension>

Requirements

Item Value
Namespace http://schemas.microsoft.com/appx/manifest/desktop/windows10/2
Minimum OS Version Windows 10 version 1703 (Build 15063)