Windows Printing Architecture Analysis and virtual printing

Source: Internet
Author: User
Tags spl

After finishing the previous papers these two days, I flipped out my graduation design and reviewed it.

Virtual printer driver. At that time, I was not very familiar with the role of my own print driver,

What is the difference between the so-called mini-driver and the Microsoft unified driver. It can be said that it was a bit confusing.

 

We will not discuss the specific implementation details here. We will only analyze them from the perspective of the global architecture.

The relationship between the Windows Printing System and the printer driver.

 

However, it should be clarified that the printer driver generally includes not only the print driver,

It also includes print processors and even port monitors in the off-line system,

These DLL files, GPD files, Inf files, and so on,

Strictly speaking, the print driver only includes two parts: graphic rendering and user interface.

 

Use Photoshop to draw a structure diagram:

 


 

I don't know why there is a strange plug-in name like "fake offline". anyway, the general structure is like this.

You can write and install the box.

 

The so-called Microsoft unified driver is the default driver of the system, and the Mini driver is customized on this basis.

Mini drivers include GPD files and resource DLL,

The GPD file is a script that defines the settings that will appear in "Printer Preferences", which are optional.

Resource DLL is a DLL that only contains resources and is provided to GPD to use the resources.

 

UI-Plugin defines some special settings pages in "Printer Preferences ".

 

Render-Plugin can perform special processing on the rendering process.

 

The print processor is responsible for SPL file operations such as EMF and RAW file operations.

 

Therefore, there are two ways to implement a virtual printer:

First, in the print processor, capture the SPL buffer file and parse it into an EMF file.

Second, it is processed in Render-Plugin to draw the image to other places during graphic rendering, such as a BMP file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.