The render module of an XPSDrv printer driver contains the filters that render the contents of the XPS spool file for output to the printer. The set of rendering filters for a driver are instantiated and run in a filter pipeline. The Filter Pipeline Manager (FPM) manages the filters, and the Inter-Filter Communicator (IFC) controls the interaction between filters.
The following diagram shows a filter pipeline.
Microsoft provides the following XPS driver components:
Filter Pipeline Manager
The Filter Pipeline Manager must:
Load and initialize filters.
Manage the data between filters.
Unload the filters when a print job is finished.
Inter-Filter Communicators manage the transfer of data between filters, and the Filter Pipeline Manager manages Inter-Filter Communicators.
The following process describes what happens to a set of filters in a pipeline:
The Filter Pipeline Manager reads the filter pipeline configuration (FPC) file.
The filters that the FPC specifies are loaded.
The filter pipeline is initialized, and the Filter Pipeline Manager starts the filter pipeline.
The first filter in the pipeline reads the XPS data through XPS or stream interfaces that the Filter Pipeline Manager offers, and then the filter processes the contents.
The first filter sends the processed XPS data to the second filter by using the interface that the Inter-Filter Communicator provides.
The Inter-Filter Communicator maintains the intermediate processing results until the second filter is ready.
Steps 1-6 are repeated from filter to filter until the results of the last filter are sent to the port that the driver has defined for output.
If a printer uses XPS as a page description language (PDL), and no other processing is desired, you can use an empty ("pass through") pipeline. If XPS is not the PDL for your printer, you will need to write a filter that converts XPS to the PDL of your printer, as well as any other processing that you want.
To develop an XPS driver, you must create the following components:
You can also add Print Ticket Support to the XPSDrv Render Module