Print Ticket and Print Capabilities Overview of Communications
Print. Ticket and Print. Capabilities: Overview of Communications Schema and API
Outline Print Schema, Print. Ticket and Print. Capabilities Overview Print. Ticket/Print. Capabilities Implementation Details Application Support Driver Requirements and Services Call to Action
Goals Define benefits for adoption of Print Schema Define the Print. Schema and Print. Ticket/Print. Capabilities Understand interaction of technologies Understand information flow Communicate the requirements to implement PT/PC in a driver Changes to existing drivers System services to assist PT/PC support
Print Settings and Capabilities Today Limited App to Driver Communication Device capabilities – Win 32 Device. Capabilities() API Binary, non-extensible Job formatting settings - DEVMODE Binary, opaque, inconsistent, non-portable No handling of user intent No consistency between capability and formatting representation Pain Points Application and driver UI and settings mismatch Application are unable to determine full capabilities of drivers
Planned Windows Longhorn Print Settings and Capabilities Print Schema XML Schema for print settings and capabilities Print Schema Framework Enables rich expression of print capabilities Enables intelligent validation of print settings and user intent Print Schema Keywords Publicly defined keywords to represent device capabilities and settings Supports private extensions
Planned Windows Longhorn Print Settings and Capabilities Print Schema Keyword Scoping Keywords are “scoped” to levels in a hierarchy Job > Document > Page Keywords can be inherited from higher levels E. g. Document. Duplex settings can be inherited from the Job level to the Document level Keywords can be overridden from lower levels E. g. Page. Media. Size settings from a Page level will override a Page. Media. Size setting from a Job or Document level
Windows Longhorn Print Settings and Capabilities Print. Ticket and Print. Capabilities (PT/PC) Implement the Print Schema on the Windows platform Print. Ticket Specify and persist print job formatting information Function parallels current binary DEVMODE structure Print. Capabilities Publish configurable device attributes Function parallels current Win 32 Device. Capabilities API
Print Driver Support for PT/PC Print Driver Provider interface Enables drivers to support PT/PC functionality Plug-in interface for Unidrv and PScript 5 drivers Enables plug-ins to extend core driver PT/PC functionality GPD/PPD to Print Schema Custom Mapping Enables translation of GPD/PPD specified keywords to Print Schema equivalents Support for all Version 3 print drivers - including Metro. Drv drivers
Application Support for PT/PC Win 32 API Enables Win 32 applications to Query Print. Capabilities Merge and validate Print. Tickets Convert between Print. Tickets and DEVMODEs Win. FX API supports Win 32 functionality for Win. FX applications Additional convenience objects partially wrap XML data to simplify application access Advanced features and private keywords require XML manipulation Win 32 and Win. FX APIs make it easy for applications to adopt PT/PC
Metro Support for PT/PC Print. Tickets define print settings for Metro Reach Packages Metro leverages the “scoping prefix” support of PT Print. Ticket “scoping” levels map directly to the Metro content hierarchy Job → Fixed. Document. Sequence Document → Fixed. Document Page → Fixed. Page Attend “Details on the Longhorn Spool File Format” presentation for more information on Metro
PT/PC XML Sample Print. Capabilities XML <f: Print. Capabilities xmlns: f="http: //. . . /printschemaframework" xmlns: k="http: //. . . /printschemakeywords"> <f: Feature name=“k: Job. Staple”> <f: Option name=“k: None”/> <f: Option name=“k: Staple. Top. Left”> <f: Scored. Property name=“k: Staple. Angle”> <psf: Value xsi: type="xs: integer">45</psf: Value> </f: Scored. Property> … </f: Feature> </f: Print. Capabilities> Print. Ticket XML <f: Print. Ticket xmlns: f="http: //. . . /printschemaframework" xmlns: k="http: //. . . /printschemakeywords"> <f: Feature name=“k: Job. Staple”> <f: Option name=“k: None”/> </f: Feature> </f: Print. Ticket>
PT/PC Metro Sample Relationship Hierarchy Metro Package Fixed. Document Sequence Fixed. Document 1 … Job PT Fixed. Document N Doc PT 1 Fixed. Page 1/1 Page PT 1/1 Doc PT N … Fixed. Page N/1 Page PT N/1 …
PT/PC Metro Sample <f: Print. Ticket. . . > <f: Feature name=“k: Page. Media. Size”> <f: Option name=“k: NALetter”/> </f: Feature> <f: Feature name=“k: Page. Output. Quality”> <f: Option name=“k: High”/> </f: Feature> <f: Feature name=“k: Page. Orientation”> <f: Option name=“k: Portrait”/> </f: Feature> </f: Print. Ticket> Job Print. Ticket <f: Print. Ticket. . . > <f: Feature name=“k: Page. Output. Quality”> <f: Option name=“k: Normal”/> </f: Feature> </f: Print. Ticket> Document Print. Ticket <f: Print. Ticket. . . > <f: Feature name=“k: Page. Orientation”> <f: Option name=“k: Landscape”/> </f: Feature> </f: Print. Ticket> Page Print. Ticket <f: Print. Ticket. . . > <f: Feature name=“k: Page. Media. Size”> <f: Option name=“k: NALetter”/> </f: Feature> <f: Feature name=“k: Page. Output. Quality”> <f: Option name=“k: Normal”/> </f: Feature> <f: Feature name=“k: Page. Orientation”> <f: Option name=“k: Landscape”/> </f: Feature> </f: Print. Ticket> + + = Merged Print. Ticket for Page
PT/PC Distribution Plans PT/PC driver support will be available on Windows XP forward PT/PC Win. FX API will only be available with Win. FX PT/PC Win 32 API planned to ship with Windows Longhorn and PT/PC drivers OS support being explored for Windows XP and later
Print. Ticket and Print. Capabilities: Implementation Details
Print. Ticket/Print. Capabilities End-to-End Managed Win 32 App Code Microsoft Win. FX App ISV Application IHV Win. FX PT/PC API Win 32 PT/PC API Platform PT/PC System Layer Driver GPD/PPD Legacy IHV Print Driver Longhorn Unidrv/PScript 5 (non-provider) (PT/PC provider) Legacy IHV Plugin (non-provider) Longhorn IHV Plugin (PT/PC provider)
Win. FX PT/PC API: Print. Queue Assembly System. Printing. dll Namespace System. Printing. Print. Sub. System Class Print. Queue APIs public Print. Capabilities Get. Print. Capabilities( Print. Ticket print. Ticket) public Memory. Stream Get. Print. Capabilities. As. Xml(Print. Ticket print. Ticket) public Validation. Result Merge. And. Validate. Print. Ticket( Print. Ticket base. Print. Ticket, Print. Ticket delta. Print. Ticket) public static int Max. Print. Schema. Version {get} public Print. Ticket User. Print. Ticket {get; set} Public Print. Ticket Default. Print. Ticket {get; set}
Win. FX PT/PC API: Print. Ticket. Converter Assembly Reach. Framework. dll Namespace System. Printing. Interop Class Print. Ticket. Converter APIs public Print. Ticket Convert. Dev. Mode. To. Print. Ticket(byte[] dev. Mode) public byte[] Convert. Print. Ticket. To. Dev. Mode( Print. Ticket print. Ticket, Base. Dev. Mode. Type base. Type) public static int Max. Print. Schema. Version {get}
Win. FX PT/PC API: Convenience Objects Assembly Reach. Framework. dll Namespace System. Printing. Configuration Class Print. Ticket, Print. Capabilities API samples pt. Page. Orientation. Value = Print. Schema. Orientation. Value. Portrait; pt. Page. Media. Size. Set. Custom. Media. Size(width, height); pt. Page. Copy. Count. Value = 10; if (pc. Supports. Capability(Print. Schema. Feature. Document. Duplex)) {. . . } foreach (Fixed. Media. Size. Option media in pc. Page. Media. Size. Capability. Fixed. Media. Sizes) {. . . } Provides object based access to PT/PC content so clients do not have to manipulate raw XML for common features For advanced or private Print Schema features clients need to access raw XML
Win. FX PT/PC API: Metro Support Assembly Presentation. Framework. dll Namespace System. Windows. Documents Class Fixed. Document. Sequence, Fixed. Document, Fixed. Page APIs public object Print. Ticket {get; set} Sample Print. Queue print. Queue = new Print. Queue(. . . ); Print. Ticket pt = print. Queue. User. Print. Ticket. Clone(); pt. Page. Orientation. Value = Print. Schema. Orientation. Value. Landscape; Fixed. Document fix. Doc = new Fixed. Document(); fix. Doc. Print. Ticket = pt;
Win 32 PT/PC API SDK Header sdkincprntvpt. h SDK Lib sdklibi 386|ia 64|amd 64prntvpt. lib APIs HRESULT HRESULT WINAPI WINAPI PTQuery. Schema. Version. Support(. . . ) PTOpen. Provider. Ex(. . . ) PTGet. Print. Capabilities(. . . ) PTMerge. And. Validate. Print. Ticket(. . . ) PTConvert. Print. Ticket. To. Dev. Mode(. . . ) PTConvert. Dev. Mode. To. Print. Ticket(. . . ) PTClose. Provider(. . . ) No Win 32 equivalent of Win. FX PT/PC convenience objects
Print. Ticket/Print. Capabilities End-to-End Managed Win 32 App Code Microsoft Win. FX App ISV Application IHV Win. FX PT/PC API Win 32 PT/PC API Platform PT/PC System Layer Driver GPD/PPD Legacy IHV Print Driver Longhorn Unidrv/PScript 5 (non-provider) (PT/PC provider) Legacy IHV Plugin (non-provider) Longhorn IHV Plugin (PT/PC provider)
PT/PC System Layer Unmanaged, common system layer for both Win. FX and Win 32 APIs Enable a single, consistent set of PT/PC APIs regardless of the underlying driver’s support For printer driver with PT/PC provider support PT/PC system layer routes client’s PT/PC request to the printer driver, and returns driver’s PT/PC service result to the client For legacy driver without PT/PC provider support PT/PC system layer performs PT/PC service on behalf of the legacy driver, with Win 32 API limitations
Support PT/PC in IHV Printer Driver Implement IPrint. Ticket. Provider interface to become a PT/PC provider: (defined in oakincprdrvcom. h) DECLARE_INTERFACE_(IPrint. Ticket. Provider, IUnknown) { // IUnknown methods skipped STDMETHOD(Get. Supported. Versions)(. . . ) STDMETHOD(Bind. Printer)(. . . ) STDMETHOD(Convert. Print. Ticket. To. Dev. Mode)(. . . ) STDMETHOD(Convert. Dev. Mode. To. Print. Ticket)(. . . ) STDMETHOD(Get. Print. Capabilities)(. . . ) STDMETHOD(Validate. Print. Ticket)(. . . ) }
Longhorn MS Core Driver PT/PC Support Longhorn Unidrv/PScript 5 core drivers are PT/PC providers Core drivers perform PT/PC operations based on GPD/PPD Printer’s capabilities, feature set and constraints Core drivers map between standard GPD/PPD features/options and public Print Schema features/options. Examples: GPD: Paper. Size, PPD: Page. Size Print. Schema: Page. Media. Size GPD: Duplex, PPD: Duplex Print. Schema: Job. Duplex
GPD/PPD Print. Schema Custom Mapping Core driver automatically converts non-standard GPD/PPD features/options Features/options scoped in a printer-model-name based private namespace URI IHV has the option to specify custom mapping using new GPD/PPD keywords Custom mapping allows IHV to specify: public Print Schema keyword a GPD/PPD feature/option should be mapped to a private namespace URI that replaces the default printer-model-name based private namespace URI Provides flexibility for specification of non-standard feature/options Map “foo” to a standard Print Schema feature or Specify a private namespace URI for “foo”
Custom Mapping GPD/PPD Samples GPD *Print. Schema. Private. Namespace. URI : “http: //www. ihv. com/schema/2004 ” *Feature: IHVStapling { *Print. Schema. Keyword. Map: “Job. Staple" *Option: Enabled { *Print. Schema. Keyword. Map: “Staple. Top. Left" } *Option: Disabled { *Print. Schema. Keyword. Map: “None“ } } PPD *MSPrint. Schema. Private. Namespace. URI : “http: //www. ihv. com/schema/2004 ” *Open. UI *IHVStapling: Pick. One *Default. IHVStapling: Disabled *IHVStapling Enabled: “. . . ” *IHVStapling Disabled: “. . . ” *Close. UI: *IHVStapling *MSPrint. Schema. Keyword. Map: Job. Staple. Top. Left *IHVStapling Enabled *MSPrint. Schema. Keyword. Map: Job. Staple None *IHVStapling Disabled
Support PT/PC in IHV Plugin When to add PT/PC support in IHV plugin? If you have capabilities, features or constraints that are not expressible in GPD/PPD If you have plugin private DEVMODE settings In general, if you want to customize core driver’s PT/PC provider behavior How to add PT/PC support in IHV plugin? Implement IPrint. Oem. Print. Ticket. Provider interface (defined in oakincprcomoem. h) DECLARE_INTERFACE_(IPrint. Oem. Print. Ticket. Provider, IUnknown) { // IUnknown methods skipped STDMETHOD(Get. Supported. Versions)(. . . ) STDMETHOD(Bind. Printer)(. . . ) STDMETHOD(Publish. Print. Ticket. Helper. Interface)(. . . ) STDMETHOD(Query. Device. Default. Namespace)(. . . ) STDMETHOD(Convert. Print. Ticket. To. Dev. Mode)(. . . ) STDMETHOD(Convert. Dev. Mode. To. Print. Ticket)(. . . ) STDMETHOD(Complete. Print. Capabilities)(. . . ) STDMETHOD(Expand. Intent. Options)(. . . ) STDMETHOD(Validate. Print. Ticket)(. . . ) };
Call To Action Understand Longhorn Print Architecture Identify strategic devices to target the Metro Print Path Identify extension scenarios Understand the Windows Color System Review the Metro v. 7 specification http: //www. microsoft. com/whdc/device/print/metro. mspx Start implementation with Beta 1! Convert GDI/DDI based drivers to Metro. Drv drivers Explore the sample filters in Longhorn Beta 1 WDK Consider on-device rendering with a RIP implementation A reference implementation is planned for Longhorn Beta 1 tools
Additional Resources E-mail For developer print questions: prninfo @ microsoft. com For developer scan questions: wiainfo @ microsoft. com For developer color questions: mscolor @ microsoft. com Developer kit references: SDK for Print Schema User Manual and Keywords: http: //winfx. msdn. microsoft. com/library/enus/printschema/Print. Schema/Overviews/Print. Schema_entry. asp WDK for PT/PC interfaces: ReferencePrinter Driver and Spooler Component InterfacesPrinter Driver Functions and StructuresUnidrv and Pscript InterfacesMethods for Print Ticket Providers and Consumers Win. FX Print System Object Documentation available in Win. FX Beta 1 SDK
© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
- Slides: 31