The printer drive method of snap-out release control
Technical field
The present invention is a kind of printer drive method of snap-out release control, particularly about a kind of when under the framework of Windows (Windows 9X/2K/XP/NT), making print processing, but the printer drive method of snap-out release operating system control.
Background technology
Because improvement of computer science, personal computer has become the indispensable articles for use of modern, and printer mostly is accompanied by personal computer, is one of most important peripheral product of personal computer.And printer is of a great variety, and stylus printer, ink-jet printer or laser printer are arranged.
No matter any printer, compare with the speed of personal computer, it all is the peripheral product that belongs at a slow speed, when computing machine is carried out print processing, its operating system control is to give the driver of printer, for service efficiency and the increase print speed that does not influence Windows operating system, the printer of present most of page-description language PDL (Page Description Language) mostly adds random-access memory (ram), the data that printed driver will be printed export in the storer of printer temporary, and control is returned operating system, so senior more printer, its memory span is big more.
Yet, when storer being used inadequately if handle a large amount of print jobs, printed driver still needs to wait for the print processing time of printer, by the time printing finishes and control could be returned operating system, and in print processing, operating system is not returned as yet because of control, and can't handle other affairs, considerably inconvenient, and the cost of memory costliness, make the holding at high price of high-end printers.
Another kind of GDI printer, because machine cost is more cheap, so the work of most of print processing is all carried out in personal computer, yet when handling a large amount of print job, printed driver will face the problem that application program need wait as long for: owing to must be finished the work of all print processing, and the system control of making can't return to application program, so application program just must be waited for, ability acquire the right of control after printed driver is handled print job, this will reduce its service efficiency greatly.
For solve inconvenience and the defective that above-mentioned existing GDI printed driver is had on print processing, propose a kind of printer drive method of snap-out release control at this: as long as printed driver is after producing the temporary file of print command, promptly transfer to printer processor at operating system background process print job, and allow application program can fetch control as early as possible, so the present invention is one reasonable in design and can effectively improve the invention of above-mentioned defective.
Summary of the invention
The printer drive method that the purpose of this invention is to provide a kind of snap-out release control, can after system application sends print command, be about to control and give back application program, and by printer processor at operating system background process print job, when a large amount of print data, application program need not be waited for the processing time before printing, significantly to improve the efficient of Windows operating system.
For reaching above-mentioned purpose, the present invention mainly provides a kind of printer drive method of snap-out release control, be to use under a Windows framework, print order by application program output one, this method comprises: give printed driver with the control of operating system; Produce a dozen printings certificates and export a driver module unit to by system's Graphics Device Interface; This driver module unit receives this print data, and produces the print data of an image, literal or figure; This driver module unit obtains a literal, figure or I/O file data, this driver module unit conversion Graphics Device Interface and this image, literal or figure print data in storer or the temporary disk after, the control that discharges this operating system is given operating system; And read this good print data of this driver module cell processing on the backstage, and handle this print data that is read by a printer processor; And after this printer processor handles the print data that is read well, export this print data after handling to a printer, finish data and print.
The printer drive method of described snap-out release control, wherein this Windows comprises Windows9X/2K/XP/NT.
The printer drive method of described snap-out release control, wherein this print data of being produced of this system's Graphics Device Interface is to produce by obtaining printer pairing system Graphics Device Interface in the system login database.
The printer drive method of described snap-out release control, wherein this driver module unit is to utilize an image module, a literal module, a figure module to produce the print data of an image, literal or figure, and utilize an input/output module to obtain literal, figure or I/O file data in the file resource storehouse, and utilize the printing data in storer or the temporary disk of an output translator conversion Graphics Device Interface and image, literal or figure by a graphical user interface module.
The printer drive method of described snap-out release control, wherein this printer processor also comprises by a working controller and arranges this printer processor to print in background process in the step of this print data that background process read.
The printer drive method of described snap-out release control, wherein this printer processor is in the step of this print data that background process read, also comprise: read the Graphics Device Interface in storer or the temporary disk and the change file of print data by a path selector, and print or the demand of graphic printing according to image printing, literal, output to corresponding path, output data in each path is converted to one 24 three-primary colours data by a graphics module.
The printer drive method of described snap-out release control, wherein this printer processor is in the step of this print data that background process read, also comprise: by a filtering module with these three-primary colours data of 24, carry out the processing procedure of color pairing, screening and layout, export printer at last again to print file.
Description of drawings
Fig. 1 is the processing flow chart of known printed driver;
Fig. 2 is a printed driver configuration diagram of the present invention; And
Fig. 3 is the processing flow chart of printed driver of the present invention.
Wherein, description of reference numerals is as follows:
10 application programs
11 GDI of system
12 system login databases
20 printed drivers
21 driver module unit
22 raster image processing modular units
211 image modules
212 literal modules
213 figure modules
214 input/output modules
215 graphical user interface module
216 file resource storehouses
217 output translators
222 path selectors
223 image printing paths
224 literal printing paths
225 graphic printing paths
226 graphics modules
227 filtering modules
Embodiment
Reach technology, means and the effect that predetermined purpose is taked in order further to understand the present invention, see also following about detailed description of the present invention and accompanying drawing, believe purpose of the present invention, feature and characteristics, can get one thus gos deep into and concrete understanding, yet accompanying drawing only provides reference and explanation usefulness, is not to be used for the present invention is limited.
Because the present invention mainly is to use under the framework of computer viewing window operating system (Windows9X/2K/XP/NT), before undeclared technology of the present invention, please consult shown in Figure 1 earlier, it is the processing flow chart of known printed driver, as computer applied algorithm (ApplicationProgram, AP) when handling print job, the control of operating system can be given the driver (S100) of printer, and driver can be carried out system's Graphics Device Interface (System GraphicsDevice Interface earlier, System GDI) (S102), GDI is the standard language of Windows operating system, utilize GDI instruction that Drawing Object is presented and be sent to printer, the printout of " finding is promptly printed " is provided.
Then, call out dynamic link library (the Dynamic LinkLibrary of printed driver (Printer Driver), DLL) (S104), generally the DLL at printed driver must handle image module (ImageModule), literal module (Text Module) and figure module (Graphics Module), so this driver can be given relevant module respectively according to the demand of this GDI and handles.
This printed driver can be carried out the DLL of a plotter program (Render) by the default printer processor (Print Processor) of operating system, demand according to this GDI is handled colour print output (S106), and carry out the DLL of a filter (Filter), after doing color pairing, screening and layout (S108), export to again and do the file printing on the printer, after the All Files printing finishes, just control can be given back operating system (S110).
From the above, the print data that known printed driver can be exported according to application program, hold the printer processor of making the operation systemic presupposition, and the DLL of the DLL of calling plotter program (Render) and filter (Filter) is to print file, so when want typescripts data volume is big, printer processor will be handled long time, and application program will be in the state of wait for a long time, might cause being discontented with of user.
The application program of some windows system still can take to be printed the stand-by period and handles (Background Process) on the backstage, therefore the present invention utilizes this characteristic, a print processor that designs is voluntarily transferred in the execution of printed driver, at the DLL of background process plotter program (Render) and the DLL of filter (Filter), and control is given back the application program of operating system, see also shown in Figure 2, it is a printed driver structural representation of the present invention, and Fig. 3 is a printed driver processing flow chart of the present invention.
When the application program in the operating system 10 will be exported a printing order (S200), can carry out a GDI11 of system (S202) earlier equally, and by obtaining the pairing system GDI11 of printer in the system login database (System Registry) 12, carry out to export to printed driver 20 of the present invention (S204), (Raster Image Processing, RIPModule) unit 22 and printed driver 20 of the present invention includes a driver module (DriverModule) unit 21 and a raster image processing module.
In this driver module unit 21, have an image module 211, a literal module 212 and a figure module 213, can carry out relevant module respectively according to the demand of GDI equally, also has an input/output module (Driver I/O Module) 214 in this driver module unit 21, by a graphic user interface (Graphics User Interface, GUI) module 215 is obtained literal, figure or the I/O file data in the file resource storehouse (Resource File) 216, again by an output translator 217 conversion GDI and print data to storer or temporary disk in.
And the present invention is after the step that executes driver module unit 21, can discharge control return operating system application program 10 (S206), carry out a printer processor (S208) in addition on the backstage, and this printer processor promptly is to handle this raster image processing modular unit 22.
In this raster image processing modular unit 22, has a working controller 221, the main arrangement allows this printer processor of the present invention at the background process print job, and when print processing, read the GDI in storer or the temporary disk and the change file of print data by a path selector 222, and print or the demand of graphic printing outputs to corresponding path (223,224,225) according to image printing, literal, output data in each path is converted to one 24 three-primary colours (R, G, B) data (S210) by a graphics module (Render Module) 226.
Then again with these three-primary colours data of 24 through a filtering module (Filter Module) 227, carry out the processing procedure (S212) of color pairing, screening and layout, export printer 30 at last again to print file.
Printed driver of the present invention the most important thing is by the printer processor of particular design at background process graphics module and filtering module, and after application program is sent print command, printed driver of the present invention is after handling the translation process of print command, promptly transfer to this printer processor in background process, give application program and discharge control, during therefore a large amount of print data, application program need not wait as long for the processing time before printing, and significantly improves the efficient of Windows operating system.
As seen the present invention really can borrow the above-mentioned technology that discloses, and provides a kind of far different in the design of known technology, can improve whole use value.
But; the above-mentioned accompanying drawing that discloses, explanation; only be embodiments of the invention, all those of ordinary skill in the art can do other all improvement according to above-mentioned explanation certainly, and these changes still belong among invention spirit of the present invention and protection scope of the present invention.