1 / 35

Core Printer Driver Improvements

Core Printer Driver Improvements. Goals. 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

fidella
Download Presentation

Core Printer Driver Improvements

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Core Printer Driver Improvements

  2. Goals • 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

  3. Outline • Longhorn core printer driver themes • Overview of new features • Feature details • Additional notes for Longhorn printer driver developers

  4. Longhorn Core Printer Driver Themes • Provide an improved user experience • Consistent end user experiences for inbox andoutbox drivers • Improved feature set and reliability • Provide new innovation opportunities • Feature parity between existing monolithic solutions and inbox drivers • Improved fidelity, smaller PDL output • Competitive performance for inbox solutions

  5. Overview: Planned Rendering Features Pre-analysis Optimized PDL Output Applications Provided by: Microsoft GDI ISV Print Spooler IHV Rendering Plug-in(s) Unidrv GPD Parser Print Hardware Devices

  6. Overview: Planned Configuration Features Full UI Replacement PrintTicket & PrintCapabilities Support New Core Helper Interface GDL- based Config Auto-Config GDL Parser Auto-Config AsyncNotify Applications Provided by: Microsoft GDI ISV Print Spooler IHV Configuration Plug-in(s) Unidrv UI / PScript5 UI GPD/PPD Parser Print Hardware Devices

  7. Core Printer Driver Improvements Details

  8. GDL – 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

  9. GDL – 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 OEM Configuration Plug-in UnidrvUI BiDi Support GDL Parser GPD Parser GPD Parser sees… *PrinterName: “ThatPrinter” *BiDiStuff: ... ... *Ifdef: GDL *% My other structured *% data & templates *Endif

  10. GDL – Generic Description Language • 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 UnidrvUI BiDi Support GDL Parser GPD Parser GDL Parser sees… *PrinterName: “ThatPrinter” *BiDiStuff: ... ... *Ifdef: GDL *% My other structured *% data & templates *Endif

  11. GDL Output *GPDFileName: Sample.gpd *Feature: RESDLL { *ConcealFromUI: TRUE *Option: UniresDLL { *Name: unires.dll } } ... GDL Parser <?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>

  12. GDL 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

  13. GDL: 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 }

  14. 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 } } }

  15. Auto-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.

  16. Auto-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) } }

  17. New 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

  18. New 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) (..); }

  19. New Core Helper Interface Unidrv STDMETHOD(CreateGDLSnapshot) (…); STDMETHOD(CreateDefaultGDLSnapshot) (…); PScript5 STDMETHOD(GetGlobalAttribute) (…) STDMETHOD(GetFeatureAttribute) (…); STDMETHOD(GetOptionAttribute) (…); IPrintCoreHelperUni IPrintCoreHelperPS IPrintCoreHelper

  20. New Core Helper Interface Support for Private Features • Unidrv • Metafile Spooling • Pages per sheet (N-Up) • Page order • Text as graphics • PScript5 • PScript 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.

  21. 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; }

  22. UI Replacement (The Harder Part) • Write your UI • Use 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

  23. Planned Rendering Performance Enhancements • 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

  24. Pre-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

  25. Pre-analysis for UnidrvRaster Driver (no OEM preanalysis) OEMStartPage OEMStartBanding OEMTextOut( “Windows”) OEMNextBand OEMTextOut(“Rocks!”) OEMNextBand OEMStartPa ge OEMStartBanding OEMTextOut( “Windows”) OEMNextBand OEMTextOut(“Rocks!”) OEMNextBand OEMStartPage OEMStartBanding OEMTextOut( “Windows”) OEMNextBand OEMTextOut(“Rocks!”) OEMNextBand My page Windows Rocks!

  26. Pre-analysis for UnidrvRaster Driver (OEM preanalysis) 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 My page Windows Rocks!

  27. PrintTicket & 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

  28. Controlling 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

  29. Down-level Operation and Dependencies • 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)

  30. 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

  31. No 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

  32. Call to Action • Explore Longhorn Print Architecture • Identify strategic devices to target the Metro Print Path • Identify extension scenarios • Convert GDI/DDI based drivers to MetroDrv 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 • Alternatively, move monolithic drivers to the core driver architecture • This provides the most stable and secure GDI/DDI-based driver environment for customers • Take advantage of the new features in the core drivers • Start building on Longhorn Beta

  33. Additional Resources • Community Sites • http://www.microsoft.com/communities/default.mspx • MSDN Developer Community Chats: • Printer Drivers -- Ask the Experts Online http://msdn.microsoft.com/chats/windows/windows_102402.asp • Windows Drivers: Printer Drivers http://msdn.microsoft.com/chats/windows/windows_101602.asp • Windows Drivers Printing and Networking http://msdn.microsoft.com/chats/windows/windows_022002.asp • Web resources • WS-Devices Profile: • http://msdn.microsoft.com/webservices/understanding/specs/default.aspx?pull=/library/en-us/dnglobspec/html/devprof.asp • Printer Working Group • http://www.pwg.org • WHDC Printing home page: http://www.microsoft.com/whdc/device/print/default.mspx • WHDC Still Imaging / WIA home page: http://www.microsoft.com/whdc/device/stillimage/default.mspx

  34. 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

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

More Related