desktop2:AppPrinter

Description

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 between 1 and 256 characters in length. This string is localizable.
                     Parameters  = A string between 1 and 32767 characters in length with a non-whitespace character at its beginning and end. >

Attributes

Attribute Description Data type Required
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

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

Namespace

http://schemas.microsoft.com/appx/manifest/desktop/windows10/2