Windows 10 Mobile Insider Preview Printing Implementation Guide

Developing printers that support Windows 10 Mobile Insider Preview

April 2015

Copyright

This document is provided "as-is." Information and views expressed in this document, including URL and other Internet Web site references, may change without notice.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2015 Microsoft. All rights reserved.

Please refer to Microsoft Trademarks for a list of trademarked products.

Portions of this software may be based on NCSA Mosaic. NCSA Mosaic was developed by the National Center for Supercomputing Applications at the University of Illinois at Urbana-Champaign. Distributed under a licensing agreement with Spyglass, Inc.

May contain security software licensed from RSA Data Security, Inc.

UPnP™ is a certification mark of the UPnP™ Implementers Corporation.

Bluetooth® is a trademark owned by Bluetooth SIG, Inc., USA and licensed to Microsoft Corporation.

Intel is a registered trademark of Intel Corporation.

Itanium is a registered trademark of Intel Corporation.

All other trademarks are property of their respective owners.

Contents

1 Introduction 5

2 Page Description Language 5

2.1 PWG Raster 5

2.1.1 Page Header Values 5

2.1.2 Host Feature Processing 14

2.2 OpenXPS 16

2.3 MS XPS 16

2.4 PCLm 17

3 Device Communication Protocol 17

3.1 Device Profile for Web Services 17

3.2 WS-Discovery 17

3.3 WS-Print v1.x 18

3.3.1 Print Job Configuration 18

3.3.2 Status, Events and Cancellation 18

3.4 WS-Print v2.0 19

3.4.1 Behavior changes for WS-Print v2.0 devices 19

4 Configuration Formats 19

4.1 PrintSchema 19

4.2 PrintDeviceCapabilities 19

4.3 PrintCapabilities 19

4.4 PrintTicket 20

4.5 Localized Resources 20

5 Conformance Requirements 20

5.1 Windows 10 Mobile compatibility table printers 20

5.2 Windows 10 Mobile compatible printers 21

5.2.1 Discovery 21

5.2.2 WS-Print requirements 21

5.2.3 PWG Raster 21

5.2.4 OpenXPS or MS XPS 21

5.2.5 PCLm 22

5.3 Windows 10 Mobile printers 22

5.3.1 Discovery 22

5.3.2 WS-Print requirements 22

5.3.3 PWG Raster 23

5.3.4 OpenXPS or MS XPS 24

5.3.5 PCLm 24

5.3.6 PrintDeviceCapabilities 24

5.4 V4 Print Drivers 25

6 Implementation Notes 25

Appendix: MIME Type Reference 25

1  Introduction

This specification describes the page description Language, protocol, and configuration formats which will be used to support printing on Windows Phone.

2  Page Description Language

Printers which are designed for Windows Phone must implement one of either the PWG Raster [PWG 5102.4-2012] or OpenXPS [ECMA-388] page description languages (PDLs). As OpenXPS is a vector based format, printers which have sufficient memory to consume OpenXPS SHOULD do so.

2.1  PWG Raster

This section discusses how PWG Raster will be implemented in Windows Phone. If not specified, the implementation is to be determined.

2.1.1  Page Header Values

2.1.1.1  MediaColor

This value will be initialized to the empty string, indicating that the default media color is to be used.

2.1.1.2  MediaType

This value will be initialized using the mapping table below.

For vendor-defined values, the non-namespaced keyword name will be used directly. For example: “ns0000:MyMediaType” will be listed as “MyMediaType”.

PrintSchema / PWG Media Type
psk:AutoSelect / auto
psk:Archival / stationery-archival
psk:BackPrintFilm / back-print-film
psk:Bond / stationery-bond
psk:CardStock / cardstock
psk:Continuous / continuous
psk:EnvelopePlain / envelope-plain
psk:EnvelopeWindow / envelope-window
psk:Fabric / fabric
psk:HighResolution / photographic
psk:Label / labels
psk:MultiLayerForm / multi-layer
psk:MultiPartForm / multi-part-form
psk:Photographic / photographic
psk:PhotographicFilm / photographic-film
psk:PhotographicGlossy / photographic-glossy
psk:PhotographicHighGloss / photographic-high-gloss
psk:PhotographicMatte / photographic-matte
psk:PhotographicSatin / photographic-satin
psk:PhotographicSemiGloss / photographic-semi-gloss
psk:Plain / stationery
psk:Screen / screen
psk:ScreenPaged / screen-paged
psk:Stationery / stationery-preprinted
psk:TabStockFull / tab-stock
psk:TabStockPreCut / tab-stock
psk:Transparency / transparency
psk:TShirtTransfer / transfer
psk:None / none
2.1.1.3  PrintContentOptimize

This value will be specified as “text-and-graphics”.

2.1.1.4  CutMedia

This value will be set to 0, indicating that media should never be cut.

2.1.1.5  Duplex

This field will be set to the following values, depending on the user's intent.

Value / Corresponding PrintTicket value
0 / psk:OneSided
1 / psk:TwoSidedShortEdge or psk:TwoSidedLongEdge
2.1.1.6  HwResolution

This field will be set according to the PWG Raster specification, depending on the user intent, and supported resolutions of the printer.

2.1.1.7  InsertSheet

InsertSheet will be set according to the PWG Raster specification, depending on the user intent. In general, this will be used to force front side on a multiple copy duplex job. Printers which support duplex MUST support this field.

2.1.1.8  Jog

This field will be set to 0, indicating that we will not jog content in the output bin.

2.1.1.9  LeadingEdge

This field will be set according to the PWG Raster specification, depending on the configuration of the user’s selected input bin.

Value / Direction
0 / Short-edge first
1 / Long-edge first
2.1.1.10  MediaPosition

This field will be set according to the PWG Raster specification, depending on the identity of the user’s selected input bin. If the selected input bin is not shown in the mapping below, this value will be set to 0.

Value / Name / PrintSchemaKeyword
0 / Auto / psk:AutoSelect
1 / Main / psk:AutoSheetFeeder
psk12:Main
2 / Alternate / psk:Cassette
psk12:Alternate
3 / LargeCapacity / psk12:LargeCapacity
4 / Manual / psk:Manual
5 / Envelope / psk12:Envelope
6 / Disc / psk12:Disc
7 / Photo / psk12:Photo
8 / Hagaki / psk12:Hagaki
9 / MainRoll / psk12:MainRoll
10 / AlternateRoll / psk12:AlternateRoll
11 / Top / psk12:Top
12 / Middle / psk12:Middle
13 / Bottom / psk12:Bottom
14 / Side / psk12:Side
15 / Left / psk12:Left
16 / Right / psk12:Right
17 / Center / psk12:Center
18 / Rear / psk12:Rear
19 / ByPassTray / psk12:ByPassTray
20 / Tray1 / psk12:Tray1
21 / Tray2 / psk12:Tray2
22 / Tray3 / psk12:Tray3
23 / Tray4 / psk12:Tray4
24 / Tray5 / psk12:Tray5
25 / Tray6 / psk12:Tray6
26 / Tray7 / psk12:Tray7
27 / Tray8 / psk12:Tray8
28 / Tray9 / psk12:Tray9
29 / Tray10 / psk12:Tray10
30 / Tray11 / psk12:Tray11
31 / Tray12 / psk12:Tray12
32 / Tray13 / psk12:Tray13
33 / Tray14 / psk12:Tray14
34 / Tray15 / psk12:Tray15
35 / Tray16 / psk12:Tray16
36 / Tray17 / psk12:Tray17
37 / Tray18 / psk12:Tray18
38 / Tray19 / psk12:Tray19
39 / Tray20 / psk12:Tray20
40 / Roll1 / psk12:Roll1
41 / Roll2 / psk12:Roll2
42 / Roll3 / psk12:Roll3
43 / Roll4 / psk12:Roll4
44 / Roll5 / psk12:Roll5
45 / Roll6 / psk12:Roll6
46 / Roll7 / psk12:Roll7
47 / Roll8 / psk12:Roll8
48 / Roll9 / psk12:Roll9
49 / Roll10 / psk12:Roll10
2.1.1.11  MediaWeightMetric

This field will be set to 0, indicating the default media weight.

2.1.1.12  NumCopies

This field is always set to 0 on Windows. For software copies, Windows will send a copy of the page each time it is required. For hardware copies, Windows will send the pages in order, but the device will need to determine whether the job should be collated/uncollated and the number of copies based on the contents of the PrintTicket.

2.1.1.13  Orientation

This field will be set according to the PWG Raster specification, depending on the user’s selected job orientation.

Value / Name / PrintSchema keyword
0 / Portrait / psk:Portrait
1 / Landscape / psk:Landscape
2 / ReversePortrait / psk:ReversePortrait
3 / ReverseLandscape / psk:ReverseLandscape
2.1.1.14  PageSize

This field will be specified according to the PWG Raster specification.

2.1.1.15  Tumble

This field will be specified according to the PWG Raster specification, depending on the user’s selected duplex type.

2.1.1.16  Width

This field will be specified according to the PWG Raster specification.

2.1.1.17  Height

This field will be specified according to the PWG Raster specification.

2.1.1.18  BitsPerColor

This field will be specified according to the PWG Raster specification.

2.1.1.19  BitsPerPixel

This field will be specified according to the PWG Raster specification.

2.1.1.20  BytesPerLine

This field will be specified according to the PWG Raster specification.

2.1.1.21  ColorOrder

This field will be specified according to the PWG Raster specification.

2.1.1.22  ColorSpace

This field will be specified according to the PWG Raster specification.

2.1.1.23  NumColors

This field will be specified according to the PWG Raster specification.

2.1.1.24  TotalPageCount

This field will be set to 0, per the PWG Raster specification, indicating that the total page count is unknown.

2.1.1.25  CrossFeedTransform

CrossFeedTransform will always be set to 1.

2.1.1.26  FeedTransform

FeedTransform will always be set to 1.

2.1.1.27  ImageBoxLeft

This field will be set to 0, indicating that the image box starts at the left-most place on the page.

2.1.1.28  ImageBoxTop

This field will be set to 0, indicating that the image box starts at the top-most place on the page.

2.1.1.29  ImageBoxRight

This field will be set to the max width of the media type which was specified, indicating that the image provided is full bleed.

2.1.1.30  ImageBoxBottom

This field will be set to the max height of the media type which was specified, indicating that the image provided is full bleed.

2.1.1.31  AlternatePrimary

This field will be set to the appropriate color value for black, indicating that no alternate primary color is supported.

2.1.1.32  PrintQuality

This field will be set to 0, indicating the default print quality.

2.1.1.33  VendorIdentifier

Depending on the configuration of the device, this field will be set to one of the following:

Value / Description
0 / Used if the device does not indicate that it supports any EmbeddedConfigurationFormatEntry values, or it indicates only application/vnd.ms-pwg-raster-empty in the PrintDeviceCapabilities file.
0x045E / Used if the device indicates that it supports application/vnd.ms-pwg-raster-1 in the EmbeddedConfigurationFormatEntry values of the PrintDeviceCapabilities file.

2.1.1.34  VendorLength

This field will be specified according to the PWG Raster specification. If the device does not indicate support for application/vnd.ms-pwg-raster-1, then the VendorLength will be 0, indicating that the VendorData section is empty.

2.1.1.35  VendorData

If the device indicates that it supports application/vnd.ms-pwg-raster-1, then the VendorData section will follow the following layout. All numbers are encoded in Big Endian (network byte order). Otherwise, it will be empty.

Name / Type / Length in bytes
VendorDataType / String / 40
VendorDataVersion / PositiveInteger / 4
Flags / Byte[] / 4
2.1.1.35.1  VendorDataType

VendorDataType will be set to "application/vnd.ms-pwg-raster-1". Consumers should always check to ensure this is the expected value before parsing further.

2.1.1.35.2  VendorDataVersion

VendorDataVersion will be set to 1.

2.1.1.35.3  Flags

The flags field is defined as a bitmask of 4 bytes.

Name / Description / Offset (in bits from most significant bit)
LastPage / This indicates that the current page will be the last one in the job. / 0
NextPageIsNewCopy / This indicates that the next page will be part of a new copy of the job. Finishing features like stapling should be applied prior to the next page. / 1
NextPageIsNewConfig / This indicates that the next page has a new orientation, paper size, media type, or paper source. / 2
OriginalPageOrientationWasPortrait / This indicates that the page was originally in Portrait orientation. / 3
OriginalPageOrientationWasLandscape / This indicates that the page was originally in the Landscape orientation. / 4
OriginalDuplexTypeTwoSidedShortEdge / This indicates that the job was duplexed using TwoSidedShortEdge. / 5
OriginalDuplexTypeTwoSidedLongEdge / This indicates that the job was duplexed using TwoSidedLongEdge. / 6
Reserved / These bits are reserved for later use. / 7-31

2.1.1.36  RenderingIntent

This field will be specified as “auto”.

2.1.1.37  PageSizeName

This field will be specified using the PWG 5101.1 standard for Media Standardized Names. Unless otherwise specified, all media names will be based on PWG 5101.1 Section 5 Media Size Self-Describing Names.

2.1.2  Host Feature Processing

Windows will support host feature processing of many features when printing to PWG Raster printers. This section describes the default behaviors for these features.

2.1.2.1  Color Space

Windows will support the following PWG Raster Document Types, as specified in Table 12 of PWG 5102.4.

Keyword / BitsPerColor / BitsPerPixel / ColorSpace / NumColors
Sgray_1 / 1 / 1 / 18 / 1
Sgray_8 / 8 / 8 / 18 / 1
Srgb_8 / 8 / 24 / 19 / 3
Cmyk_8 / 8 / 32 / 6 / 4
Sgray_16 / 16 / 16 / 18 / 1
Srgb_16 / 16 / 48 / 19 / 3
Cmyk_16 / 16 / 64 / 6 / 4

2.1.2.2  Multiple Copies

By default, Windows will support host processing of the psk:JobCopiesAllDocuments, and psk:DocumentCopiesAllPages Parameters. The psk:PageCopies option is not supported. Printers can opt out of host processing of these Parameters by marking the ParameterDef in their PrintDeviceCapabilities file with the attribute psf2:deviceProcessed=”true”.

Windows will process each of these exclusively on the client, by adding additional pages to the document. If the job’s PrintTicket has set the either the psk:JobCollateAllDocuments or psk:DocumentCollate feature to psk:Collated, then the copies will be generated as a collated document, with the pages following the order 1, 2, 3, N, 1, 2, 3, N…. Otherwise, Windows will generate the copies as 1, 1, 2, 2, 3, 3, N, N….

On the last page of a copy, if the device supports the Microsoft PWG Raster VendorData section, Windows will set the NextPageIsNewCopy flag.

2.1.2.3  Orientation

By default, Windows will support host processing of the psk:PageOrientation feature and rotate all content which is set as psk:Landscape to psk:Portrait. After rotating this content, the PWG Raster page header’s Orientation field will be set to Portrait. Additionally, Windows will orient all PWG Raster content according to the psk:FeedDirection of the selected JobInputBin, DocumentInputBin or PageInputBin, unless the selected psk:PageMediaSize specifies the psf2:feedDirectionOverride parameter.

Additionally, if the device supports the Microsoft PWG Raster VendorData section, Windows will set the OriginalPageOrientationWasPortrait and the OriginalPageOrientationWasLandscape flags appropriately.

Devices can opt-out of host processing of psk:PageOrientation behavior by marking the Options of the psk:PageOrientation Feature in their PrintDeviceCapabilities file with the attribute psf2:deviceProcessed=”true”.

2.1.2.4  Duplex