core printer driver improvements. goals understand what’s new in unidrv and pscript5, the windows...

35
Core Printer Driver Improvements

Upload: justin-ronald-harrell

Post on 01-Jan-2016

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Core Printer Driver Improvements

Page 2: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

GoalsGoals

Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers

Understand how to take advantage of the new enhancements in the core drivers

Understand how the core drivers and plug-ins interact with existing Windows operating systems

Page 3: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

OutlineOutline

Longhorn core printer driver themes

Overview of new features

Feature details

Additional notes for Longhorn printer driver developers

Page 4: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Longhorn Core Printer Driver ThemesLonghorn Core Printer Driver Themes

Provide an improved user experienceConsistent end user experiences for inbox andoutbox drivers

Improved feature set and reliability

Provide new innovation opportunitiesFeature parity between existing monolithic solutions and inbox drivers

Improved fidelity, smaller PDL outputCompetitive performance for inbox solutions

Page 5: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Print Spooler

Overview: Planned Rendering FeaturesOverview: Planned Rendering Features

Provided by:

Microsoft

ISV

IHV

GDI

Applications

Print Hardware Devices

Unidrv

GPD Parser

RenderingPlug-in(s) Pre-analysis

Optimized PDL Output

Page 6: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Print Spooler

Overview: Planned Configuration FeaturesOverview: Planned Configuration Features

Provided by:

Microsoft

ISV

IHV

GDI

Applications

Print Hardware Devices

ConfigurationPlug-in(s)

Unidrv UI / PScript5 UI

GPD/PPD Parser

Full UI Replacement

GDL Parser

GDL-basedConfig

New Core Helper Interface

PrintTicket & PrintCapabilities

Support

AsyncNotify

Auto-Config

Auto-Config

Page 7: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Core Printer Driver Improvements Details

Page 8: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

GDL – Generic Description LanguageGDL – Generic Description Language

Allows Unidrv to provide parsed GPD config file to plug-ins (not available in PScript5)

Converts input into XML data that can be easily consumed

Supports a generic user defined data Allows you to add additional data

Visible only through GDL parser

Page 9: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

GPD Parser sees…

GDL – Generic Description LanguageGDL – Generic Description Language

Data inside GDL statements will not be used by Unidrv

Output from GPD parser was not designed to be published to plug-ins

UnidrvUI

GPD Parser

GDLParser

*PrinterName: “ThatPrinter”

*BiDiStuff: ...

...

*Ifdef: GDL

*% My other structured

*% data & templates

*Endif

BiDiSupport

OEM Configuration

Plug-in

Page 10: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

GDL Parser sees…

GDL – Generic Description LanguageGDL – Generic Description Language

UnidrvUI

GPD Parser

GDLParser

*PrinterName: “ThatPrinter”

*BiDiStuff: ...

...

*Ifdef: GDL

*% My other structured

*% data & templates

*Endif

BiDiSupport

Allows IHVs to access information from the GPD

Allows you to provide arbitrary data in the config file(s) that your plug-ins can consume

Provides BiDi support

OEM Configuration

Plug-in

Page 11: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

GDL OutputGDL Output *GPDFileName: Sample.gpd*Feature: RESDLL{ *ConcealFromUI: TRUE *Option: UniresDLL { *Name: unires.dll }}...

<?xml version="1.0" encoding="UTF-8"?><SnapshotRoot ...><GDL_ATTRIBUTE Name="*GPDFileName" xsi:type="GDLW_string">Sample.GPD</GDL_ATTRIBUTE>

<CONSTRUCT Name="*Feature" Instance="RESDLL">

<GDL_ATTRIBUTE Name="*ConcealFromUI?“ xsi:type="GDLW_XML_BOOLEAN">TRUE</GDL_ATTRIBUTE>

<CONSTRUCT Name="*Option" Instance="UniresDLL" Constrained="FALSE"> <GDL_ATTRIBUTE Name="*Name" xsi:type="GDLW_string" >unires.dll</GDL_ATTRIBUTE> </CONSTRUCT></CONSTRUCT>...</SnapshotRoot>

GDL Parser

Page 12: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

GDL TemplatesGDL Templates

Templates:Enable you to add custom data to the config file

Define how that data is formatted and presented to your plug-in

A standard template is provided for all config content that the core drivers understand

Your additional templates can appear inline in your GPD file inside an *Ifdef GDL

Page 13: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

GDL: Sample TemplateGDL: Sample Template*Template: GPD_NORMAL_STRING *% ANSI string { *Type: DATATYPE *DataType: FILTER_TYPE *ElementType: XSD_STRING *FilterTypeName: "NORMAL_STRING"}

*Template: V_QUERYSTRING{ *Type: ATTRIBUTE *ValueType: GPD_NORMAL_STRING *Virtual: TRUE}

Page 14: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

GDL: Sample Template (con’t)GDL: Sample Template (con’t)*Template: QUERYSTRING{ *Name: "*QueryString" *Inherits: V_QUERYSTRING}

*Template: BIDIQUERY{ *Name: "*BidiQuery" *Instances: <ANY> *Type: CONSTRUCT *Members: (QUERYSTRING) *Production: SATISFY_ALL { *Member: QUERYSTRING {*Occurs: 1 } }}

Page 15: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Auto-configAuto-config

Enables support for automatic detection of installable options

Requires no plug-in code. GDL changes only.

Supported by tcpmon

Unidrv: Auto-config information is embedded in GPD / GDL file

PScript5: You can include an additional GDL file specifically for BiDi. You will not be able to access this file from your plug-in.

Page 16: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Auto-config: ExampleAuto-config: Example*Feature: DuplexUnit{

*BidiQuery: DuplexInstalled{

*QueryString: "\Printer.Configuration.DuplexUnit:Installed"

}*BidiResponse: DuplexInstalled{

*ResponseType: BIDI_BOOL*ResponseData: ENUM_OPTION (DuplexUnit)

}  *Option: NotInstalled

{*BidiValue: BOOL(FALSE)

}*Option: Installed{

*BidiValue: BOOL(TRUE)}

}

Page 17: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

New Core Helper InterfaceNew Core Helper Interface

Models the existing PScript5 IPrintCoreUI2 interface

In addition, the interface:Is available in both Unidrv & PScript5

Doesn’t use multi strings

Was designed to maximize performance & ease of use

Page 18: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

New Core Helper InterfaceNew Core Helper Interface

DECLARE_INTERFACE_(IPrintCoreHelper, IUnknown)

{

STDMETHOD(GetOption) (…);

STDMETHOD(SetOptions) (…);

STDMETHOD(EnumConstrainedOptions) (…);

STDMETHOD(WhyConstrained) (…);

STDMETHOD(EnumFeatures) (…);

STDMETHOD(EnumOptions) (…);

STDMETHOD(GetFontSubstitution) (…);

STDMETHOD(SetFontSubstitution) (…);

STDMETHOD(CreateInstanceOfMSXMLObject) (..);

}

Page 19: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

New Core Helper InterfaceNew Core Helper Interface

Unidrv

STDMETHOD(CreateGDLSnapshot) (…);

STDMETHOD(CreateDefaultGDLSnapshot) (…);PScript5

STDMETHOD(GetGlobalAttribute) (…)

STDMETHOD(GetFeatureAttribute) (…);

STDMETHOD(GetOptionAttribute) (…);

IPrintCoreHelper

IPrintCoreHelperPSIPrintCoreHelperUni

Page 20: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

New Core Helper Interface Support for New Core Helper Interface Support for Private FeaturesPrivate Features

UnidrvMetafile Spooling

Pages per sheet (N-Up)

Page order

Text as graphics

PScript5PScript custom page size

Metafile spooling

Mirroring

Output format & protocol

Pages per sheet & page order

… and much more

The Goal:

Allow plug-ins to configure any settings

that the core driver allows a user to set.

Page 21: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

UI Replacement (The Easy Part)UI Replacement (The Easy Part)

HRESULT __stdcall

OEMUI::HideStandardUI( DWORD dwMode )

{

switch( dwMode )

{

case OEMCUIP_DOCPROP:

case OEMCUIP_PRNPROP:

return S_OK;

}

return E_NOTIMPL;

}

Page 22: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

UI Replacement (The Harder Part)UI Replacement (The Harder Part)

Write your UIUse GDL

Use the new helper interface

If you are trying to get your driver in-box, follow in-box UI guidelines. Key points to be aware of:

Minimal branding

Minimal graphics –16-bit is preferred

Standard Windows design guidelines

Page 23: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Planned Rendering Performance Planned Rendering Performance EnhancementsEnhancements

Far East TrueType font support for Unidrv

PCL-XL enhancements

Monochrome text z-order fixes

Blank band optimizations

New DDI hooks

Intra-page color/black band switching

JPEG escape support

Opt-in rendering enhancements for Unidrv

Page 24: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Pre-analysisPre-analysis

Provides the driver access to primitives in a pre-rendering pass

Force banding: first band is the full page with no band clipping

No rendering during pre-analysis pass

Enabled by GPD flag

Pre-analysis Unidrv samples will be available in Longhorn builds

Page 25: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Pre-analysis for UnidrvPre-analysis for UnidrvRaster Driver (no OEM preanalysis)Raster Driver (no OEM preanalysis)

OEMStartPage

OEMStartBanding

OEMTextOut( “Windows”)

OEMNextBand

OEMTextOut(“Rocks!”)

OEMNextBand

WindowsWindows

Rocks!Rocks!

My pageMy page

OEMStartPage

OEMStartBanding

OEMTextOut( “Windows”)

OEMNextBand

OEMTextOut(“Rocks!”)

OEMNextBand

OEMStartPa ge

OEMStartBanding

OEMTextOut( “Windows”)

OEMNextBand

OEMTextOut(“Rocks!”)

OEMNextBand

Page 26: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Pre-analysis for UnidrvPre-analysis for UnidrvRaster Driver (OEM preanalysis)Raster Driver (OEM preanalysis)

WindowsWindows

Rocks!Rocks!

My pageMy page

OEMStartPage

OEMStartBanding

OEMTextOut( “Windows”)

OEMTextOut(“Rocks”)

OEMNextBand(pptl=null)

OEMTextOut( “Windows”)

OEMNextBand

OEMTextOut(“Rocks!”)

OEMNextBand

OEMStartPage

OEMStartBanding

OEMTextOut( “Windows”)

OEMTextOut(“Rocks”)

OEMNextBand(pptl=null)

OEMTextOut( “Windows”)

OEMNextBand

OEMTextOut(“Rocks!”)

OEMNextBand

OEMStartPage

OEMStartBanding

OEMTextOut( “Windows”)

OEMTextOut(“Rocks”)

OEMNextBand(pptl=null)

OEMTextOut( “Windows”)

OEMNextBand

OEMTextOut(“Rocks!”)

OEMNextBand

OEMStartPage

OEMStartBanding

OEMTextOut( “Windows”)

OEMTextOut(“Rocks”)

OEMNextBand(pptl=null)

OEMTextOut( “Windows”)

OEMNextBand

OEMTextOut(“Rocks!”)

OEMNextBand

Page 27: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

PrintTicket & PrintCapabilitiesPrintTicket & PrintCapabilities

Open-ended configuration infrastructure

Applications can read arbitrary print jobsettings, not just limited fields availablein public DEVMODE

Providing a better app experience requires help from the drivers

Unidrv and PScript5 both provide extended PrintTicket & PrintCapabilities support

Page 28: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Controlling PrintTicket & PrintCapabilitiesControlling PrintTicket & PrintCapabilities

From plug-in code:Implement IPrintOemPrintTicketProvider

Control or change how GPD/PPD-based features appear in PrintTicket & PrintCapabilities

Edit XML results directly

Support settings & capabilities of private DEVMODE

From the GPD/PPD file:Override the namespace the core driver generates for your driver

Map features in the GPD/PPD file to specific public print schema features

Page 29: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Planned technologies exposed throughcore drivers

GDL (Windows 2000 & newer)

PrintTicket & PrintCapabilities (Windows XP with Windows FX, Longhorn)

Full UI replacement (Windows 2000 & newer)

Pre-analysis (Windows XP SP1 & newer)

Technologies dependent on non-driver components will not be available to drivers running down-level

Async UI/Async Notification

Bidi API (on Windows 2000)

Custom print processors (Point & Print)

Down-level Operation and Dependencies

Page 30: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

New drivers that use these technologies need to be platform aware

Operate gracefully on platforms where technology is not available

Controlled functional degradation is acceptable; down-level instability is not

In-box drivers must run with the same binaries on Windows 2000, Windows XP, Windows Server 2003, and Longhorn

Down-level Operation and Dependencies

Page 31: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

No Kernel Mode Print DriversNo Kernel Mode Print Drivers

In Windows Server 2003, installation of kernel mode print drivers is blocked by default

Policy-based

In Longhorn, kernel mode printer driverswill not run

The infrastructure to support them will not be present

There will be no way to enable kernel mode drivers

Core drivers provide a quick way to migrate away from kernel mode drivers and provide maximum functionality for minimal cost

Page 32: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Call to ActionCall to Action

Explore Longhorn Print ArchitectureIdentify strategic devices to target the Metro Print PathIdentify extension scenariosConvert GDI/DDI based drivers to MetroDrv drivers

Explore the sample filters in Longhorn Beta 1 WDK

Consider on-device rendering with a RIP implementationA reference implementation is planned for Longhorn Beta 1 tools

Alternatively, move monolithic drivers to the core driver architecture

This provides the most stable and secure GDI/DDI-based driver environment for customersTake advantage of the new features in the core drivers

Start building on Longhorn Beta

Page 33: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Additional ResourcesAdditional Resources

Community Siteshttp://www.microsoft.com/communities/default.mspx MSDN Developer Community Chats:

Printer Drivers -- Ask the Experts Online http://msdn.microsoft.com/chats/windows/windows_102402.aspWindows Drivers: Printer Drivers http://msdn.microsoft.com/chats/windows/windows_101602.aspWindows Drivers Printing and Networking http://msdn.microsoft.com/chats/windows/windows_022002.asp

Web resourcesWS-Devices Profile:http://msdn.microsoft.com/webservices/understanding/specs/default.aspx?pull=/library/en-us/dnglobspec/html/devprof.asp Printer Working Grouphttp://www.pwg.org WHDC Printing home page: http://www.microsoft.com/whdc/device/print/default.mspxWHDC Still Imaging / WIA home page: http://www.microsoft.com/whdc/device/stillimage/default.mspx

Page 34: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

Additional ResourcesAdditional Resources

E-mailFor developer print questions: prninfo @ microsoft.com

For developer scan questions: wiainfo @ microsoft.com

For developer color questions: mscolor @ microsoft.com

Page 35: Core Printer Driver Improvements. Goals Understand what’s new in Unidrv and PScript5, the Windows codenamed "Longhorn" core drivers Understand how to

© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.