CN103034460A - Method and device for testing printer driver - Google Patents

Method and device for testing printer driver Download PDF

Info

Publication number
CN103034460A
CN103034460A CN2011102999967A CN201110299996A CN103034460A CN 103034460 A CN103034460 A CN 103034460A CN 2011102999967 A CN2011102999967 A CN 2011102999967A CN 201110299996 A CN201110299996 A CN 201110299996A CN 103034460 A CN103034460 A CN 103034460A
Authority
CN
China
Prior art keywords
dot matrix
file
command parameter
module
output file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011102999967A
Other languages
Chinese (zh)
Other versions
CN103034460B (en
Inventor
沈景华
石绍坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201110299996.7A priority Critical patent/CN103034460B/en
Publication of CN103034460A publication Critical patent/CN103034460A/en
Application granted granted Critical
Publication of CN103034460B publication Critical patent/CN103034460B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

The invention provides a method for testing a printer driver. The method comprises the following steps of: executing a printer driver to print operation into an output file; converting a dot matrix in the output file into an image file; and detecting whether the image file is correct or not. The invention further provides a device for testing a printer driver. The device comprises a printing module, a converting module and an image module, wherein the printing module is used for executing the printer driver to print operation into the output file; the converting module is used for converting the dot matrix in the output file into the image file; and the image module is used for providing the image file, and detecting whether the image file is correct or not by a user. Due to the adoption of the method and the device, the testing efficiency of the printer driver is increased.

Description

Printed driver method of testing and device
Technical field
The present invention relates to the printing technique field, in particular to a kind of printed driver method of testing and device.
Background technology
Usually after the printed driver in the printing software is finished writing, need to test the printed driver of finishing writing.The method of test comprises: print parameters is set, and the print driver in the executive software checks that to drive the printer print job whether the result who prints is correctly to judge whether printed driver is write correctly under various parameter combinations.
The inventor finds, in practical operation, often can be subject to the restriction of some objective condition and can't realize above-mentioned test, and for example current do not have printer in kind, just can test when then will by the time printer be arranged, thereby cause the prolongation of performance history.Even printer has been arranged, also to spend a lot of time to print just and can see Output rusults, affected the efficient of test printing machine driver.
Summary of the invention
The present invention aims to provide a kind of printed driver method of testing and device, to solve the lower problem of testing efficiency of correlation technique.
In an embodiment of the present invention, provide a kind of printed driver method of testing, having comprised: carried out printed driver operation is printed to an output file; Dot matrix in the output file is converted to image file; Whether the check image file is correct.
In an embodiment of the present invention, provide a kind of printed driver proving installation, having comprised: print module is used for carrying out printed driver operation is printed to an output file; Modular converter is used for the dot matrix of output file is converted to image file; Whether image module is used for providing image file, be used for the user and check correct.
The printed driver method of testing of the embodiment of the invention and device are tested because of the method that adopts virtual printing, thus overcome the lower problem of the testing efficiency of correlation technique, and then improved the testing efficiency of printed driver.
Description of drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Fig. 1 shows the process flow diagram according to the printed driver method of testing of the embodiment of the invention;
Fig. 2 shows the process flow diagram according to the printed driver proving installation of the embodiment of the invention.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.It is pointed out that printer (printer) herein also contains simultaneously printing machine (printer).
Fig. 1 shows the process flow diagram according to the printed driver method of testing of the embodiment of the invention, comprising:
Step S10 carries out printed driver operation is printed to an output file;
Step S20 is converted to image file with the dot matrix in the output file;
Step S30, whether the check image file is correct.
In correlation technique, by carrying out print driver driving the printer print job, so test process depends on the printing of printer in kind.And in the present embodiment, use the method print job of virtual printing by carrying out print driver, therefore test process is no longer dependent on the printing of printer in kind, only need to provide general computer run environment to get final product, this has improved the convenience of test process significantly, and then has improved the efficient of printing test.
The mistake that checks out in step S30 obviously also can similarly occur at real online printing.If the new equipment that connects is with a series of with the equipment that has been connected, then the driver with the method inspection of present embodiment is correct, and then print driver is correct substantially.If the new printing device that connects is new range, when with after this method inspection and having revised driver, actual on-line retrieval correctness once again is not because get rid of the different situation of new range printer and anticipation.
Preferably, step S10 comprises: carry out driver to be measured, output operation is file.Be output as file 2 kinds of methods are arranged.A kind of is the passage output that driver to be measured calls certain printer of installing in the operating system of OpenPrinter function by this computing machine, then " port " in " attribute " of this printer is revised as " FILE " port, normal execution driver to be measured just can be output as file again.Another kind is the function that calls the establishment file of CreateFile or fopen and so in the driver to be measured, in software, set filename and path, the command parameter that will export to printer and dot matrix are write in the file with the function of WriteFile or fwite and so on, carried out driver to be measured and just can be output as file.
Preferably, step S20 comprises: read dot matrix in the output file according to the interface protocol of printed driver; The dot matrix that reads is saved as one or more image files.An important content measurement for printed driver is to check whether print image is correct.By dot matrix is converted to image file, can presents this dot matrix at display intuitively, thereby make things convenient for user's check image correctness, thereby judge whether printed driver is write correctly.
For printing software, the method that checks linked network normally directly or observe macroscopic view and the microcosmic picture element of export by magnifier.Adopt this preferred embodiment, can also check quickly and easily correctness and the quality thereof of linked network.For example, the dot matrix content of reading to come from output file can save as TIF figure according to the TIF file layout, also can save as according to the alternative document form image file of extended formatting.The user can amplify the image file of opening, thereby can check correctness and the quality thereof of software linked network.
Preferably, the dot matrix that reads being converted to one or more image files comprises: the dot matrix of each space of a whole page that will read saves as respectively image file, i.e. a gray level image; The dot matrix of a plurality of spaces of a whole page that perhaps will read saves as image file, i.e. a coloured image.This dual mode provides more flexibly user's operation.
Preferably, this method also comprises: obtain the command parameter in the output file; Check whether command parameter is correct.Another important content measurement for printed driver is to check whether command parameter is correct.This preferred embodiment has increased the command parameter test to printed driver, better Reality simulation print scene.
Preferably, the command parameter of obtaining in the output file comprises: read command parameter in the output file according to the interface protocol of printed driver; The display command parameter, and/or command parameter is saved in the text.This dual mode provides more flexibly user's operation.
Fig. 2 shows the process flow diagram according to the printed driver proving installation of the embodiment of the invention, comprising:
Print module 10 is used for carrying out printed driver operation is printed to an output file;
Modular converter 20 is used for the dot matrix of output file is converted to image file;
Whether image module 30 is used for providing image file, be used for the user and check correct.
In the present embodiment, use the method print job of virtual printing by carrying out print driver, therefore test process is no longer dependent on the printing of printer in kind, only need to provide general computer run environment to get final product, this has improved the convenience of test process significantly, and then has improved the efficient of printing test.
Preferably, modular converter 20 comprises: read module, for the dot matrix that reads output file according to the interface protocol of printed driver; Preserve module, be used for the dot matrix that reads is saved as one or more image files.
Preferably, the dot matrix of preserving each space of a whole page that module will read saves as respectively an image file; The dot matrix of a plurality of spaces of a whole page that perhaps will read saves as an image file.
Preferably, this proving installation also comprises: acquisition module, for the command parameter of obtaining output file; Whether the command parameter module is used for providing command parameter, be used for the user and check correct.
Preferably, acquisition module comprises: protocol module, for the command parameter that reads output file according to the interface protocol of printed driver; Display module is used for the display command parameter, and/or command parameter is saved in the text.
The below describes the application scenarios of one embodiment of the invention in detail.Selecting an edge is not blank operation, wide 231mm, high 180mm.Printing drive software interface setting in pretest: resolution is 720*720dpi; Paper size is A3, i.e. 297*420mm; Left side sky is 20mm, and the top sky is 10mm; Upper paper mode is coil paper, cuts paper after the printing.Color mode is that 4 looks are printed.
Submit to this operation to software under testing, print a file A.According to the interface protocol of printed driver reading order one by one from file A, and be presented on the interface of detecting driver software.Read-out resolution from file A, transverse and longitudinal all are 720, and be consistent with setting value, praises.The reading operation size is the 6560*5120 pixel, and according to driving interface protocol, being scaled millimeter according to current resolution is 6560/720*25.4=231.4mm, and 5120/720*25.4=180.6mm ignores error component, and is consistent with setting value, praises.Read paper size, be the 8416*11936 pixel, being scaled millimeter according to current resolution is 8416/720*25.4=296.9mm, and 11936/720*25.4=421mm ignores error component, and is consistent with setting value, praises.Reading left side sky is 576 pixels, and being scaled millimeter according to current resolution is 576/720*25.4=20.3mm, ignores error component, consistent with setting value, praises.Reading the top sky is 288 pixels, and being scaled millimeter according to current resolution is 288/720*25.4=10.16mm, ignores error component, consistent with setting value, praises.Reading the paper mode is 1, and according to driving interface protocol, 0 represents single-sheet stationery, and 1 represents coil paper, praises.Reading the mode of cutting is 1, and according to driving interface protocol, 0 representative does not cut, and 1 representative cuts, and praises.Read the order that sends dot matrix, at first see number of colours, totally 4 kinds, consistent with setting value, praise.
Create 4 TIF files, setting the wide of TIF file is 6560 pixels, and height is 5120 pixels, and look face number is 1, namely generates gray level image.According to driving interface protocol, driver sends picture material to printer and sends according to the every look face of every row, and namely every row dot array data sends 4 times, is respectively the CMYK4 look, then sends the next line data.Read the C look face data of N capable (N is 1 to 5120 integer), according to driving interface protocol, the data of reading are to have done compression, then the data of reading to come are done and are decompressed, and write in the 1st the TIF file; The like, read respectively the MYK look face data of one's own profession, after the decompression, write respectively in the 2nd, 3,4 TIF files.Then read the next line dot array data, write equally in 4 TIF files.Until all data lines run through, close 4 TIF files.Open 4 TIF files of preservation with image software, open the operation of submission again, select only to show certain of the same colour among the CMYK, compare with 4 T1F images preserving, whether viewing content is correct.For example whether viewing content lacks, is out of shape, and left hand edge and coboundary should not have blank.If check correctness and the quality thereof of software linked network, then amplify TIF figure, check dot matrix.
As can be seen from the above description, it is a kind of in the situation of off line that the embodiment of the invention provides, and checks the method and apparatus of the mistake in the printed driver.Whether the method is be connected can be in the situation of unactual connection printer, check in advance in the driver wrongly, saved the time of a large amount of tests, can also check in addition correctness and the quality thereof of linked network.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the memory storage and be carried out by calculation element, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a printed driver method of testing is characterized in that, comprising:
Carry out printed driver operation is printed to an output file;
Dot matrix in the described output file is converted to image file;
Check whether described image file is correct.
2. method according to claim 1 is characterized in that, the dot matrix in the described output file is converted to image file comprises:
Read dot matrix in the described output file according to the interface protocol of described printed driver;
The described dot matrix that reads is saved as one or more described image files.
3. method according to claim 2 is characterized in that, the described dot matrix that reads is converted to one or more described image files comprises:
The described dot matrix of each space of a whole page of reading is saved as respectively a described image file; Perhaps
The described dot matrix of a plurality of spaces of a whole page of reading is saved as a described image file.
4. method according to claim 1 is characterized in that, also comprises:
Obtain the command parameter in the described output file;
Check whether described command parameter is correct.
5. method according to claim 4 is characterized in that, the command parameter of obtaining in the described output file comprises:
Read described command parameter in the described output file according to the interface protocol of described printed driver;
Show described command parameter, and/or described command parameter is saved in the text.
6. a printed driver proving installation is characterized in that, comprising:
Print module is used for carrying out printed driver operation is printed to an output file;
Modular converter is used for the dot matrix of described output file is converted to image file;
Whether image module is used for providing described image file, be used for the user and check correct.
7. device according to claim 6 is characterized in that, described modular converter comprises:
Read module is for the dot matrix that reads described output file according to the interface protocol of described printed driver;
Preserve module, be used for the described dot matrix that reads is saved as one or more described image files.
8. device according to claim 7 is characterized in that, the described dot matrix of each space of a whole page that described preservation module will read saves as respectively a described image file; The described dot matrix of a plurality of spaces of a whole page that perhaps will read saves as a described image file.
9. device according to claim 6 is characterized in that, also comprises:
Acquisition module is for the command parameter of obtaining described output file;
Whether the command parameter module is used for providing described command parameter, be used for the user and check correct.
10. device according to claim 9 is characterized in that, described acquisition module comprises:
Protocol module is for the described command parameter that reads described output file according to the interface protocol of described printed driver;
Display module is used for showing described command parameter, and/or described command parameter is saved in the text.
CN201110299996.7A 2011-09-30 2011-09-30 Method and device for testing printer driver Expired - Fee Related CN103034460B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110299996.7A CN103034460B (en) 2011-09-30 2011-09-30 Method and device for testing printer driver

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110299996.7A CN103034460B (en) 2011-09-30 2011-09-30 Method and device for testing printer driver

Publications (2)

Publication Number Publication Date
CN103034460A true CN103034460A (en) 2013-04-10
CN103034460B CN103034460B (en) 2015-07-22

Family

ID=48021394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110299996.7A Expired - Fee Related CN103034460B (en) 2011-09-30 2011-09-30 Method and device for testing printer driver

Country Status (1)

Country Link
CN (1) CN103034460B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106610802A (en) * 2016-12-15 2017-05-03 国网江苏省电力公司淮安供电公司 Method for construction and storage of image file of lattice diagram of virtual printer used for protective device
CN107025076A (en) * 2016-02-01 2017-08-08 阿里巴巴集团控股有限公司 One kind automation printing test method and device
CN112597021A (en) * 2020-12-24 2021-04-02 中国农业银行股份有限公司 Bank counter transaction automatic testing method and device based on linkage printer

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060114490A1 (en) * 2004-12-01 2006-06-01 Xerox Corporation System and method for document production visualization
CN101093437A (en) * 2006-06-21 2007-12-26 三星电子株式会社 Method of providing print preview of print document
CN101551765A (en) * 2008-04-02 2009-10-07 福建升腾资讯有限公司 Test method for strength printing based on virtual device software
CN101593087A (en) * 2008-05-29 2009-12-02 福建升腾资讯有限公司 Print preview method based on the WINCE system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060114490A1 (en) * 2004-12-01 2006-06-01 Xerox Corporation System and method for document production visualization
CN101093437A (en) * 2006-06-21 2007-12-26 三星电子株式会社 Method of providing print preview of print document
CN101551765A (en) * 2008-04-02 2009-10-07 福建升腾资讯有限公司 Test method for strength printing based on virtual device software
CN101593087A (en) * 2008-05-29 2009-12-02 福建升腾资讯有限公司 Print preview method based on the WINCE system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025076A (en) * 2016-02-01 2017-08-08 阿里巴巴集团控股有限公司 One kind automation printing test method and device
CN107025076B (en) * 2016-02-01 2020-04-28 菜鸟智能物流控股有限公司 Automatic printing test method and device
CN106610802A (en) * 2016-12-15 2017-05-03 国网江苏省电力公司淮安供电公司 Method for construction and storage of image file of lattice diagram of virtual printer used for protective device
CN106610802B (en) * 2016-12-15 2019-08-09 国网江苏省电力公司淮安供电公司 The dot chart image file of protective device virtual printer constructs and storage method
CN112597021A (en) * 2020-12-24 2021-04-02 中国农业银行股份有限公司 Bank counter transaction automatic testing method and device based on linkage printer

Also Published As

Publication number Publication date
CN103034460B (en) 2015-07-22

Similar Documents

Publication Publication Date Title
CN102035961B (en) Image processing system and image processing method
KR20150104022A (en) Image inspecting apparatus and image inspecting program
US7852498B2 (en) Post-printing process support system, post-printing process support program, and post-printing process support method
US20070019234A1 (en) Printing system
US9378546B2 (en) Image defect visibility predictor
US20110286669A1 (en) Form processing system, ocr device, form creation device, and computer readable medium
US10452944B2 (en) Multifunction peripheral assisted optical mark recognition using dynamic model and template identification
CN103034460B (en) Method and device for testing printer driver
US20100277751A1 (en) System and method for color printer calibration employing measurement success feedback
JP2017005714A (en) Indicator of special processing for print verification system
EP0760140B1 (en) Method and system for checking print orders for short run printing applications
US7835027B2 (en) Reducing the resolution of a rendered image for printing
US6930790B1 (en) Color rendering dictionary for testing color conversion
US6608932B1 (en) Outline font for analytical assessment of printed text quality
US20080316223A1 (en) Image generation method
CN100382002C (en) Printing method and apparatus for rectifying error and computer readable recording medium
EP2996029B1 (en) Method for generating a proof of a print job comprising a document to be printed with parameters and system therewith
JP3492297B2 (en) Image processing method, image processing apparatus, and storage medium
CN104424091B (en) Test method and system of raster image processor
US7855807B2 (en) Digital image processor spot color workflow test file
JP4924294B2 (en) Image processing apparatus and image processing program
JP6613871B2 (en) Information processing apparatus, image reading apparatus, and program
US20130141767A1 (en) Print Verification Database Mechanism
US11341382B1 (en) Evaluation of print verification system
US20160119489A1 (en) Image forming system and image forming method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150722

Termination date: 20190930

CF01 Termination of patent right due to non-payment of annual fee