1 / 28

Filter-based Print Drivers: Overview

Filter-based Print Drivers: Overview. Outline. MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion Call to Action. Goals. Define MetroDrv and the key components Understand information flow

lin
Télécharger la présentation

Filter-based Print Drivers: Overview

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. Filter-based Print Drivers:Overview

  2. Outline • MetroDrv Architecture and Data Flow • Filter Pipeline Implementation • MetroDrv Filter Development Discussion • Call to Action

  3. Goals • Define MetroDrv and the key components • Understand information flow • Communicate the requirements for developing MetroDrv drivers • Windows Services • IHV Supplied Components • Present a set of sample filters for a MetroDrv driver • Developed by Software Imaging

  4. What is a MetroDrv driver? • Extension of the Version 3 driver architecture • Consumes Metro Spool Files in an extensible manner • Sibling of the Unidrv and PScript core drivers • Compatible with Windows XP and later • Enabler for document and color workflow scenarios • Persist richness of Avalon and Metro on paper • Return to WYSIWYG • High, wide and deep color from application to device

  5. MetroDrv Driver Components • Configuration Module • Vendor defined Version 3 configuration module for the filter pipeline processing capabilities and device capabilities • Requirements • Support Version 3 driver configuration: Unidrv, PScript, monolithic configuration module • PrintTicket/PrintCapabilities support • GDI to Metro Converter • Microsoft defined Version 3 driver rendering module • Performs necessary conversions to support Win32 applications • Processing Module (Filter Pipeline) • Vendor defined processing module that processes Metro Reach Package content into the output PDL • Filter Pipeline Configuration File • Vendor defined setup file that describes the filters in the pipeline, including ordering, input and output data types

  6. MetroDrv Driver Data Flow Provided by: Microsoft Win32 App WinFX App ISV IHV MetroDrv Driver Filter Pipeline Version 3 Driver Metro Filter 1 Conversion Render Module Config Module/ Plug-in Filter N

  7. Filter Pipeline:Components and Interfaces

  8. Filter Pipeline Outline • Supports multiple vendor supplied filters • Print Processing Filters • Color conversion Filters • Rendering Filters • Setup by Filter Pipeline Configuration File • XML file • Defines filters in the pipeline and input/output data types • Implicitly defines data processing order • Public Interfaces implemented by vendors • IPrintPipelineFilter • IInterFilterCommunicator

  9. Filter Pipeline Architecture Overview • Service: PrintFilterPipelineSvc • NT Authority\Local Service • Normal non-admin user • SeImpersonatePrivilege • SeCreateGlobalPrivilege • SeChangeNotifyPrivilege • Controls Filter Creation and Communication • Scheduler • Inter Filter Communicator • Property Bag • Handle notifications from / to spooler

  10. Filter Pipeline Architecture Overview Provided by: Filter Pipeline Control Logic Control Tree Watermark Microsoft Filters Reader/Writers ISV IHV Transparency Scheduler N-UP Value “Token” “Notify” “IDrvNotify” Property Bag PipelineManager PrintFilterPipelineSvc

  11. Filter Pipeline Configuration File <Filters> <Filter dll = “FirstFilter.dll" clsid = "{15e81b32-6838-49e9-a495-25664f3f09e9}" name = “Filter 1: NUp Filter" input = "{d4bb258b-ff10-4af0-b67e-bde41c5e0e1c}" output = "{f4873ed9-a87c-48e3-b6dd-f6e182fe97b8}“ /Filter> <Filter dll = “SecondFilter.dll" clsid = "{8c89b2aa-a151-4f94-92bf-7beaee679eab}" name = “Filter 2: Rendering Filter" input = "{f4873ed9-a87c-48e3-b6dd-f6e182fe97b8}" output = "{f50b8346-7a10-4d24-945c-1a2ca6fe9a11}“ /Filter> </Filters>

  12. Filter Interface interface IPrintPipelineFilter : IUnknown { HRESULT SetReadersWriters( IInterFilterCommunicator *pFilterCommunicator, IPrintPipelinePropertyBag *pIPropertyBag ); HRESULT ShutdownOperation( void ); HRESULT StartOperation( void ); }

  13. Filter Communicator Interface interface IInterFilterCommunicator : IUnknown { HRESULT RequestReader( const wchar_t *pszStream, EPrintPipelineStreamAccessMode accessMode, REFIID iidRepresentation, REFIID iidResultReader, void **ppReader ); HRESULT RequestWriter( const wchar_t *pszStream, EPrintPipelineStreamAccessMode accessMode, EPrintPipelineStreamChangeMode changeMode, REFIID iidRepresentation, REFIID iidResultWriter, void **ppWriter ); }

  14. Inter-Filter Communicator Details Provided by: Microsoft Filter Pipeline Manager IHV Metro Spool File Metro Reader Inter-Filter Communicator Filter 1 FixedDocument Writer FixedDocument FixedDocument Reader Inter-Filter Communicator Filter 2 … Stream Writer Stream Filter N

  15. Filter Pipeline Data Flow - Longhorn Managed Code PrintFilterPipelineSvc Spooler WinFX App Pipeline Manager FilterPipelinePrxy Port PrintQueue Selector Scheduler METRO Metro Reach Processing (Rich Content Structure) N-Up WaterMark Winspool.drv and Extensions Renderer WinFx Printing Support Unmanaged Code Reach and Serialization Services Microsoft Provided by: ISV Metro Spool File IHV

  16. Filter Pipeline Data Flow - Downlevel Managed Code Unmanaged Code PrintFilterPipelineSvc Spooler WinFX App Pipeline Manager MS Print Processor Port PrintQueue Selector METRO Scheduler N-Up WaterMark Winspool.drv and Extensions Renderer WinFx Printing Support Reach and Serialization Services Metro Spool File

  17. Consuming Metro in a DriverSoftware Imaging

  18. Outline • Introduction • Filter essentials • Building a reusable filter • Building functionality within the pipeline • Sample Filter Pipeline

  19. Software Imaging - Who are we? • Specialists in printing and imaging technologies • Founded 1989 • Over 80 million drivers shipped worldwide • Offices in North America, Japan and Europe • Unidrv specialists and developers • Developing solutions for the industry • MetroDrv host drivers • MetroDrv wide-gamut color printing (scRGB)

  20. Filter Essentials: Filter Types • Document modifier • e.g. booklet printing, watermark • Markup modifier • e.g. color conversion • Renderer • e.g. Raster conversion, print output formatting • Markup “simplifier” • Handling unsupported features • “Value add” • e.g. print preview, status monitor, accounting, archiving

  21. Filter Essentials: Handling the PrintTicket • Every filter is interested in the PrintTicket (PT)! • Three levels of PT: Job, Document, Page • Validation of the Print Ticket • Validate job-level PT • Merge with default PT and validate • For each document in the job • Merge doc-level PT with job-level PT and validate • For each page in the document • Merge page-level PT with doc-level PT and validate • Extract filter-relevant feature options

  22. Building a Reusable Filter • Metro in, Metro out • Rely on the PrintTicket for control • No device assumptions or dependencies • Example: 2-up filter

  23. Building Functionality Within the Pipeline • Combining filters to build features • Need inter-filter communication • Could be PrintTicket • Can use property bag • Example: Booklet • Page re-order filter • 2-up filter

  24. Sample Filter Pipeline

  25. Call To Action • Understand Windows codenamed “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 and provide feedback to prninfo@microsoft.com • http://www.microsoft.com/whdc/device/print/metro.mspx • Start implementation with Beta 1! • Convert GDI/DDI based drivers to MetroDrv drivers • Explore the sample filters in Longhorn Beta 2 WDK • Consider on-device rendering with a RIP implementation • A reference implementation is planned for Longhorn Beta 2 tools

  26. Additional Resources: Web • 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 • Color Use Caseshttp://www.microsoft.com/whdc/device/display/color/WCS_cases.mspx • “Writing Effective Use Cases”, Alistair Cockburn, ISBN 0201702258

  27. Additional Resources: Other • 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/en-us/printschema/PrintSchema/Overviews/PrintSchema_entry.asp • WDK for PT/PC interfaces: Reference\Printer Driver and Spooler Component Interfaces\Printer Driver Functions and Structures\Unidrv and Pscript Interfaces\Methods for PrintTicket Providers and Consumers • WinFX Print System Object • Documentation available in WinFX Beta 1 SDK

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