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

Method and device for testing printer driver Download PDF

Info

Publication number
CN103034460B
CN103034460B CN201110299996.7A CN201110299996A CN103034460B CN 103034460 B CN103034460 B CN 103034460B CN 201110299996 A CN201110299996 A CN 201110299996A CN 103034460 B CN103034460 B CN 103034460B
Authority
CN
China
Prior art keywords
dot matrix
file
image file
command parameter
module
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.)
Expired - Fee Related
Application number
CN201110299996.7A
Other languages
Chinese (zh)
Other versions
CN103034460A (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

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 printing technique field, in particular to a kind of printed driver method of testing and device.
Background technology
After printed driver in usual printing software is finished writing, the printed driver to finishing writing is needed to test.The method of test comprises: arrange print parameters, the print driver in executive software, to drive printer print job, checks that whether the result printed under various parameter combinations is all correct in judge whether printed driver is write correctly.
Inventor finds, in practical operation, often can be subject to the restriction of some objective condition and cannot realize above-mentioned test, and such as current do not have printer in kind, then by the time will have when printer and just can test, thus cause the prolongation of performance history.Even if there has been printer, a lot of time also to be spent to print and just can see Output rusults, have impact on the efficiency of test driver.
Summary of the invention
The present invention aims to provide a kind of printed driver method of testing and device, with the problem that the testing efficiency solving correlation technique is lower.
In an embodiment of the present invention, provide a kind of printed driver method of testing, comprising: perform printed driver and operation is printed to an output file; Dot matrix in output file is converted to image file; Whether check image file is correct, thus judges whether print driver is write correctly; Wherein, the dot matrix in output file is converted to image file to comprise: read the dot matrix in output file according to the interface protocol of printed driver; The dot matrix of reading is saved as one or more image file.
In an embodiment of the present invention, providing a kind of printed driver proving installation, comprising: print module, for performing printed driver, operation being printed to an output file; Modular converter, for being converted to image file by the dot matrix in output file; Image module, for providing image file, checks whether correctly for user, thus judges whether print driver is write correctly; Wherein, modular converter comprises: read module, for reading the dot matrix in output file according to the interface protocol of printed driver; Preserve module, for the dot matrix of reading is saved as one or more image file.
The printed driver method of testing of the embodiment of the present invention and device, because adopt the method for virtual printing to test, so the problem that the testing efficiency overcoming correlation technique is lower, and then improve the testing efficiency of printed driver.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 shows the process flow diagram of the printed driver method of testing according to the embodiment of the present invention;
Fig. 2 shows the process flow diagram of the printed driver proving installation according to the embodiment of the present 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 printing machine (printer) simultaneously.
Fig. 1 shows the process flow diagram of the printed driver method of testing according to the embodiment of the present invention, comprising:
Step S10, performs printed driver and operation is printed to an output file;
Step S20, is converted to image file by the dot matrix in output file;
Step S30, whether check image file is correct.
In the related, by performing print driver to drive printer print job, therefore test process depends on the printing of printer in kind.And in the present embodiment, by performing the method print job of print driver virtual printing, therefore test process is no longer dependent on the printing of printer in kind, only need to provide general computer run environment, which significantly enhances the convenience of test process, and then improve the efficiency of printing test.
The mistake checked out in step s 30, obviously also can similarly occur at real online printing.If the new equipment connected is with a series of with the equipment be connected, be then correct with the driver that the method for the present embodiment is checked, then print driver is correct substantially.If the new printing device connected is new range, when with this method inspection and after having revised driver, can actual on-line retrieval correctness once again, because do not get rid of the different situation of new range printer and anticipation.
Preferably, step S10 comprises: perform driver to be measured, and output operation is file.Export as file has 2 kinds of methods.A kind of is that driver to be measured is called OpenPrinter function and exported by the passage of certain printer installed in the operating system of this computing machine, then " port " in " attribute " of this printer is revised as " FILE " port, more normal execution driver to be measured just can export as file.Another kind is the function of the establishment file calling CreateFile or fopen and so in driver to be measured, set filename and path in software, the function of the command parameter and dot matrix WriteFile or fwite and so on that will export to printer is write in file, performs driver to be measured and just can export as file.
Preferably, step S20 comprises: read the dot matrix in output file according to the interface protocol of printed driver; The dot matrix of reading is saved as one or more image file.An important content measurement for printed driver checks that printed drawings similarly is correctly no.By dot matrix is converted to image file, this dot matrix can be presented over the display intuitively, thus facilitate user's check image correctness, thus judge whether printed driver is write correctly.
For printing software, the method checking linked network normally directly or observed macroscopic view and the microcosmic picture element of export by magnifier.Adopt this preferred embodiment, correctness and the quality thereof of linked network can also be checked quickly and easily.Such as, the dot matrix content reading to come from output file can save as TIF figure according to TIF file layout, also can save as the image file of extended formatting according to alternative document form.The image file opened can amplify by user, thus can check correctness and the quality thereof of software linked network.
Preferably, the dot matrix of reading is converted to one or more image file to comprise: the dot matrix of each space of a whole page read is saved as image file, i.e. a gray level image respectively; Or the dot matrix of the multiple spaces of a whole page read is saved as image file, i.e. a coloured image.These two kinds of modes provide user operation more flexibly.
Preferably, this method also comprises: obtain the command parameter in output file; Check that whether command parameter is correct.Another important content measurement for printed driver checks that whether command parameter is correct.This preferred embodiment adds to be tested the command parameter of printed driver, can Reality simulation print scene better.
Preferably, the command parameter obtained in output file comprises: read the command parameter in output file according to the interface protocol of printed driver; Display command parameter, and/or command parameter is saved in text.These two kinds of modes provide user operation more flexibly.
Fig. 2 shows the process flow diagram of the printed driver proving installation according to the embodiment of the present invention, comprising:
Print module 10, prints to an output file for performing printed driver by operation;
Modular converter 20, for being converted to image file by the dot matrix in output file;
Image module 30, for providing image file, checks whether correctly for user.
In the present embodiment, by performing the method print job of print driver virtual printing, therefore test process is no longer dependent on the printing of printer in kind, only need to provide general computer run environment, which significantly enhances the convenience of test process, and then improve the efficiency of printing test.
Preferably, modular converter 20 comprises: read module, for reading the dot matrix in output file according to the interface protocol of printed driver; Preserve module, for the dot matrix of reading is saved as one or more image file.
Preferably, preserve module and the dot matrix of each space of a whole page read is saved as an image file respectively; Or the dot matrix of the multiple spaces of a whole page read is saved as an image file.
Preferably, this proving installation also comprises: acquisition module, for obtaining the command parameter in output file; Command parameter module, for providing command parameter, checks whether correctly for user.
Preferably, acquisition module comprises: protocol module, for reading the command parameter in output file according to the interface protocol of printed driver; Display module, for display command parameter, and/or is saved in command parameter in text.
The application scenarios of one embodiment of the invention is described below in detail.An edge is selected not to be 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 top sky is 10mm; Upper paper mode is coil paper, cuts paper after printing.Color mode is that 4 looks print.
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 at detect driver software interface on.Read-out resolution from file A, transverse and longitudinal is all 720, consistent with setting value, praises.Reading operation size is 6560*5120 pixel, and according to driving interface protocol, being scaled millimeter according to current resolution is 6560/720*25.4=231.4mm, 5120/720*25.4=180.6mm, ignores error component, consistent with setting value, praises.Read paper size, be 8416*11936 pixel, being scaled millimeter according to current resolution is 8416/720*25.4=296.9mm, 11936/720*25.4=421mm, ignores error component, 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 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.In reading, paper mode is 1, and according to driving interface protocol, 0 represents single-sheet stationery, and 1 represents coil paper, praises.It is 1 that reading cuts mode, and according to driving interface protocol, 0 representative does not cut, and 1 representative cuts, and praises.Read the order sending dot matrix, first see number of colours, totally 4 kinds, consistent with setting value, praise.
Create 4 TIF files, the wide of setting 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 according to often going the transmission of every look face to printer, and namely often row dot array data sends 4 times, is CMYK4 look respectively, then sends next line data.Read the C look face data of N-th row (N is the integer of 1 to 5120), according to driving interface protocol, the data reading to come have done compression, then do the data reading to come and decompress, write in the 1st TIF file; The like, read the MYK look face data of one's own profession respectively, after decompression, write the 2nd respectively, 3, in 4 TIF files.Then read 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, then open the operation of submission, select only to show certain of the same colour in CMYK, compared with 4 the TIF images preserved, whether viewing content is correct.Such as 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, embodiments provide a kind of when off line, check the method and apparatus of the mistake in printed driver.Whether the method and device can, when unactual connection printer, check in driver wrong in advance, save the time of a large amount of test, can also check correctness and the quality thereof of linked network in addition.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, 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 amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. a printed driver method of testing, is characterized in that, comprising:
Perform printed driver and operation is printed to an output file;
Dot matrix in described output file is converted to image file;
Check that whether described image file is correct, thus judge whether print driver is write correctly;
Wherein, describedly dot matrix in described output file be converted to image file comprise:
The dot matrix in described output file is read according to the interface protocol of described printed driver;
The dot matrix of described reading is saved as one or more described image file.
2. method according to claim 1, is characterized in that, the dot matrix of described reading is converted to one or more described image file and comprises:
The described dot matrix of each space of a whole page read is saved as a described image file respectively; Or
The described dot matrix of the multiple spaces of a whole page read is saved as a described image file.
3. method according to claim 1, is characterized in that, also comprises:
Obtain the command parameter in described output file;
Check that whether described command parameter is correct.
4. method according to claim 3, is characterized in that, the command parameter obtained in described output file comprises:
The described command parameter in described output file is read according to the interface protocol of described printed driver;
Show described command parameter, and/or described command parameter is saved in text.
5. a printed driver proving installation, is characterized in that, comprising:
Print module, prints to an output file for performing printed driver by operation;
Modular converter, for being converted to image file by the dot matrix in described output file;
Image module, for providing described image file, checks whether correctly for user, thus judges whether print driver is write correctly;
Wherein, described modular converter comprises:
Read module, for reading the dot matrix in described output file according to the interface protocol of described printed driver;
Preserve module, for the dot matrix of described reading is saved as one or more described image file.
6. device according to claim 5, is characterized in that, the described dot matrix of each space of a whole page read is saved as a described image file by described preservation module respectively; Or the described dot matrix of the multiple spaces of a whole page read is saved as a described image file.
7. device according to claim 5, is characterized in that, also comprises:
Acquisition module, for obtaining the command parameter in described output file;
Command parameter module, for providing described command parameter, checks whether correctly for user.
8. device according to claim 7, is characterized in that, described acquisition module comprises:
Protocol module, for reading the described command parameter in described output file according to the interface protocol of described printed driver;
Display module, for showing described command parameter, and/or is saved in described command parameter in 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 CN103034460A (en) 2013-04-10
CN103034460B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025076B (en) * 2016-02-01 2020-04-28 菜鸟智能物流控股有限公司 Automatic printing test method and device
CN106610802B (en) * 2016-12-15 2019-08-09 国网江苏省电力公司淮安供电公司 The dot chart image file of protective device virtual printer constructs and storage method
CN112597021B (en) * 2020-12-24 2024-08-02 中国农业银行股份有限公司 Bank counter transaction automatic testing method and device based on linkage printer

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9104358B2 (en) * 2004-12-01 2015-08-11 Xerox Corporation System and method for document production visualization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN103034460A (en) 2013-04-10

Similar Documents

Publication Publication Date Title
CN102035961B (en) Image processing system and image processing method
KR20150104022A (en) Image inspecting apparatus and image inspecting program
US8229230B2 (en) Method of digital image comparison for imaging software development
US20110286043A1 (en) Form processing system, ocr device, form creation device, and computer readable medium
US9390352B2 (en) Concurrent image and diagnostic pattern printing
US20110286669A1 (en) Form processing system, ocr device, form creation device, and computer readable medium
US9378546B2 (en) Image defect visibility predictor
US20100020351A1 (en) Image processing apparatus, image processing method, and computer readable medium
CN103034460B (en) Method and device for testing printer driver
US20190147286A1 (en) Multifunction peripheral assisted optical mark recognition using dynamic model and template identification
US20100277751A1 (en) System and method for color printer calibration employing measurement success feedback
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
US9274732B2 (en) Form processing system, form creation device, and computer readable medium
US6608932B1 (en) Outline font for analytical assessment of printed text quality
US6930790B1 (en) Color rendering dictionary for testing color conversion
EP2996029B1 (en) Method for generating a proof of a print job comprising a document to be printed with parameters and system therewith
CN104424091B (en) Test method and system of raster image processor
US20130141767A1 (en) Print Verification Database Mechanism
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
US11341382B1 (en) Evaluation of print verification system
CN111105468B (en) Printing processing method, device and storage medium
US20060290959A1 (en) Image processing apparatus and method for controlling image processing apparatus, and program product

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150722

Termination date: 20190930