Upload
justin-ronald-harrell
View
233
Download
0
Tags:
Embed Size (px)
Citation preview
Core Printer Driver Improvements
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
OutlineOutline
Longhorn core printer driver themes
Overview of new features
Feature details
Additional notes for Longhorn printer driver developers
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
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
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
Core Printer Driver Improvements Details
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
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
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
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
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
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}
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 } }}
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.
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)}
}
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
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) (..);
}
New Core Helper InterfaceNew Core Helper Interface
Unidrv
STDMETHOD(CreateGDLSnapshot) (…);
STDMETHOD(CreateDefaultGDLSnapshot) (…);PScript5
STDMETHOD(GetGlobalAttribute) (…)
STDMETHOD(GetFeatureAttribute) (…);
STDMETHOD(GetOptionAttribute) (…);
IPrintCoreHelper
IPrintCoreHelperPSIPrintCoreHelperUni
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.
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;
}
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
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
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
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
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
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
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
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
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
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
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
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
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
© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.