Top Banner
Filter-based Print Drivers: Overview
28

Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Dec 23, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter-based Print Drivers:Overview

Page 2: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

OutlineOutline

MetroDrv Architecture and Data Flow

Filter Pipeline Implementation

MetroDrv Filter Development Discussion

Call to Action

Page 3: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

GoalsGoals

Define MetroDrv and the key componentsUnderstand 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

Page 4: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

What is a MetroDrv driver?What is a MetroDrv driver?

Extension of the Version 3 driver architectureConsumes 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

Page 5: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

MetroDrv Driver ComponentsMetroDrv Driver Components

Configuration Module Vendor defined Version 3 configuration module for the filter pipeline processing capabilities and device capabilities

RequirementsSupport Version 3 driver configuration: Unidrv, PScript, monolithic configuration module

PrintTicket/PrintCapabilities support

GDI to Metro ConverterMicrosoft 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 FileVendor defined setup file that describes the filters in the pipeline, including ordering, input and output data types

Page 6: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

MetroDrv Driver Data FlowMetroDrv Driver Data Flow

Provided by:

Microsoft

ISV

IHV

MetroDrv Driver

Version 3 Driver

Win32 App WinFX App

Config Module/Plug-in

ConversionRender Module

Filter Pipeline

Filter 1

Filter N

Metro

Page 7: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter Pipeline:Components and Interfaces

Page 8: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter Pipeline OutlineFilter Pipeline Outline

Supports multiple vendor supplied filtersPrint Processing Filters

Color conversion Filters

Rendering Filters

Setup by Filter Pipeline Configuration FileXML file

Defines filters in the pipeline and input/output data types

Implicitly defines data processing order

Public Interfaces implemented by vendorsIPrintPipelineFilter

IInterFilterCommunicator

Page 9: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter Pipeline Architecture OverviewFilter Pipeline Architecture Overview

Service: PrintFilterPipelineSvcService: PrintFilterPipelineSvcNT Authority\Local ServiceNT Authority\Local Service

Normal non-admin userNormal non-admin user

SeImpersonatePrivilegeSeImpersonatePrivilege

SeCreateGlobalPrivilegeSeCreateGlobalPrivilege

SeChangeNotifyPrivilegeSeChangeNotifyPrivilege

Controls Filter Creation and CommunicationControls Filter Creation and CommunicationSchedulerScheduler

Inter Filter CommunicatorInter Filter Communicator

Property BagProperty Bag

Handle notifications from / to spoolerHandle notifications from / to spooler

Page 10: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter Pipeline Architecture OverviewFilter Pipeline Architecture Overview

PipelineManagerPipelineManager

PrintFilterPipelineSvcPrintFilterPipelineSvc

Control Tree

Filters Reader/Writers

Scheduler

“Token” Value

“Notify” “IDrvNotify”

Property Bag

N-UP

Transparency

Watermark

Filter PipelineFilter Pipeline

Control LogicControl Logic

Provided by:

Microsoft

ISV

IHV

Page 11: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter Pipeline Configuration FileFilter 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>

Page 12: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter InterfaceFilter Interface

interface IPrintPipelineFilter : IUnknown{HRESULTSetReadersWriters(

IInterFilterCommunicator *pFilterCommunicator,IPrintPipelinePropertyBag *pIPropertyBag);

HRESULTShutdownOperation(

void);

HRESULTStartOperation(

void);

}

Page 13: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter Communicator InterfaceFilter Communicator Interface

interface IInterFilterCommunicator : IUnknown{HRESULTRequestReader(

const wchar_t *pszStream,EPrintPipelineStreamAccessMode accessMode,REFIID iidRepresentation,REFIID iidResultReader,void **ppReader);

HRESULTRequestWriter(

const wchar_t *pszStream,EPrintPipelineStreamAccessMode accessMode,EPrintPipelineStreamChangeMode changeMode,REFIID iidRepresentation,REFIID iidResultWriter,void **ppWriter);

}

Page 14: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Inter-Filter Communicator DetailsInter-Filter Communicator Details

Filter Pipeline Manager

Inter-FilterInter-FilterCommunicatorCommunicator

FixedDocument Writer

Metro Reader

Stream

FixedDocument

Metro Spool File

Inter-FilterInter-FilterCommunicatorCommunicator

Stream Writer

FixedDocument Reader

Filter 1

Filter 2

Filter N

Provided by:

Microsoft

IHV

Page 15: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

PrintFilterPipelineSvc

Managed CodeManaged Code

WinFx Printing Support

Reach and Serialization Services

Metro Spool File

Winspool.drv and Extensions

Spooler

PrintQueueMETR

O

Metro Reach Processing (Rich Content Structure)

Scheduler

FilterPipelinePrxyPort

WinFX App

PipelineManager

Selector

WaterMark

Renderer

N-Up

Filter Pipeline Data Flow - LonghornFilter Pipeline Data Flow - Longhorn

Provided by:

Microsoft

ISV

IHV

Unmanaged CodeUnmanaged Code

Page 16: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Unmanaged CodeUnmanaged Code

PrintFilterPipelineSvc

Managed CodeManaged Code

WinFx Printing Support

Reach and Serialization Services

Metro Spool File

Winspool.drv and Extensions

Spooler

PrintQueueMETR

OScheduler

MS PrintProcessor

Port

WinFX App

PipelineManager

Selector

WaterMark

Renderer

N-Up

Filter Pipeline Data Flow - DownlevelFilter Pipeline Data Flow - Downlevel

Page 17: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Consuming Metro in a DriverConsuming Metro in a DriverSoftware Imaging

Page 18: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

OutlineOutline

Introduction

Filter essentials

Building a reusable filter

Building functionality within the pipeline

Sample Filter Pipeline

Page 19: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Software Imaging - Who are we?Software Imaging - Who are we?

Specialists in printing and imaging technologiesFounded 1989

Over 80 million drivers shipped worldwide

Offices in North America, Japan and Europe

Unidrv specialists and developers

Developing solutions for the industryMetroDrv host drivers

MetroDrv wide-gamut color printing (scRGB)

Page 20: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter Essentials: Filter TypesFilter Essentials: Filter Types

Document modifiere.g. booklet printing, watermark

Markup modifiere.g. color conversion

Renderere.g. Raster conversion, print output formatting

Markup “simplifier”Handling unsupported features

“Value add”e.g. print preview, status monitor, accounting, archiving

Page 21: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Filter Essentials: Handling the PrintTicketFilter Essentials: Handling the PrintTicket

Every filter is interested in the PrintTicket (PT)!

Three levels of PT: Job, Document, Page

Validation of the Print TicketValidate job-level PT

Merge with default PT and validate

For each document in the jobMerge doc-level PT with job-level PT and validate

For each page in the documentMerge page-level PT with doc-level PT and validate

Extract filter-relevant feature options

Page 22: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Building a Reusable FilterBuilding a Reusable Filter

Metro in, Metro out

Rely on the PrintTicket for controlNo device assumptions or dependencies

Example: 2-up filter

Page 23: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Building Functionality Within the PipelineBuilding Functionality Within the Pipeline

Combining filters to build features

Need inter-filter communicationCould be PrintTicket

Can use property bag

Example: BookletPage re-order filter

2-up filter

Page 24: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Sample Filter PipelineSample Filter Pipeline

Page 25: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Call To ActionCall 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 [email protected]

http://www.microsoft.com/whdc/device/print/metro.mspx

Start implementation with Beta 1!

Convert GDI/DDI based drivers to MetroDrv driversExplore the sample filters in Longhorn Beta 2 WDK

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

Page 26: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Additional Resources: WebAdditional Resources: WebWeb resources

WS-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.mspxColor Use Caseshttp://www.microsoft.com/whdc/device/display/color/WCS_cases.mspx

“Writing Effective Use Cases”, Alistair Cockburn, ISBN 0201702258

Page 27: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

Additional Resources: OtherAdditional Resources: OtherE-mail

For developer print questions: [email protected]

For developer scan questions: [email protected]

For developer color questions: [email protected]

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 Print Ticket Providers and Consumers

WinFX Print System ObjectDocumentation available in WinFX Beta 1 SDK

Page 28: Filter-based Print Drivers: Overview. Outline MetroDrv Architecture and Data Flow Filter Pipeline Implementation MetroDrv Filter Development Discussion.

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