CN112817546A - Printer data redirection method and device, equipment and storage medium - Google Patents

Printer data redirection method and device, equipment and storage medium Download PDF

Info

Publication number
CN112817546A
CN112817546A CN202110138491.6A CN202110138491A CN112817546A CN 112817546 A CN112817546 A CN 112817546A CN 202110138491 A CN202110138491 A CN 202110138491A CN 112817546 A CN112817546 A CN 112817546A
Authority
CN
China
Prior art keywords
data
printing
printer
print
task
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.)
Pending
Application number
CN202110138491.6A
Other languages
Chinese (zh)
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.)
Beijing Data Driven Technology Co ltd
Original Assignee
Beijing Data Driven Technology 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 Beijing Data Driven Technology Co ltd filed Critical Beijing Data Driven Technology Co ltd
Priority to CN202110138491.6A priority Critical patent/CN112817546A/en
Publication of CN112817546A publication Critical patent/CN112817546A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1211Improving printing performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1242Image or content composition onto a page

Abstract

The application discloses a printer data redirection method which comprises the steps of monitoring a print pool task in real time, obtaining print data when printing is conducted through a preset virtual driver, and conducting data cleaning on the print data to generate visual data. Therefore, the instruction data capable of identifying cleaning is obtained and sent to the real printer. The process can not affect the printing effect and quality at all, and can also completely identify the content of the merchant printing bill.

Description

Printer data redirection method and device, equipment and storage medium
Technical Field
The present disclosure relates to the field of printer technologies, and in particular, to a method and an apparatus for redirecting printer data, a device, and a storage medium.
Background
In order to obtain the ticket printing content of the merchant completely, the printing data is obtained from the printer, and then the data instruction is cleaned to obtain text or image data for analyzing into format data. At present, most of data of printer brands which publish printer instruction formats can be cleaned, and a part of printing data formats are not disclosed, so that the difficulty of instruction cleaning is increased.
At present, no good technical means exists for cleaning the part of the instructions.
Disclosure of Invention
In view of this, the present disclosure provides a method for redirecting printer data, including:
monitoring the tasks of the printing pool in real time;
acquiring printing data when printing is performed through a preset virtual drive;
and performing data cleaning on the printing data to generate visual data.
In one possible implementation manner, the method further includes:
and sending the visual data to a printer port for printing.
In one possible implementation, the data cleansing the print data to generate the visualization data includes:
analyzing the printing data according to a standard printing instruction to obtain printing information after data cleaning;
extracting bill contents from the printing information; wherein the billing content includes an image and text.
In one possible implementation manner, the method further includes: and editing the visual data.
In one possible implementation, editing the visualization data includes:
acquiring edit data;
and editing the visual data according to the editing data to generate new visual data.
In one possible implementation, analyzing the print pool job to obtain the task printer includes:
shd files are obtained;
and obtaining the task printer according to the shd file.
In a possible implementation manner, the analyzing the print data according to a standard print instruction to obtain the print information after data cleaning includes:
acquiring an spl file;
and analyzing the spl file according to a standard printing instruction to obtain the printing information after data cleaning.
According to another aspect of the present disclosure, a printer data redirection device is provided, which is characterized by a print job monitoring module, a print data acquisition module and a visualized data generation module;
the printing task monitoring module is configured to monitor the printing pool task in real time;
the printing data acquisition module is configured to acquire printing data when printing is performed through a preset virtual drive;
the visualized data generation module is configured to perform data cleaning on the printing data to generate visualized data.
According to another aspect of the present disclosure, there is provided a printer data redirection apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the executable instructions to implement the method of any preceding claim.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of the preceding.
Through real-time supervision print pool task, when printing through predetermineeing virtual drive, acquire the print data, carry out data cleaning to the print data and generate visual data. Therefore, the instruction data capable of identifying cleaning is obtained and sent to the real printer. The process can not affect the printing effect and quality at all, and can also completely identify the content of the merchant printing bill.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 shows a flow diagram of a printer data redirection method of an embodiment of the present disclosure;
FIG. 2 illustrates another flow chart of a printer data redirection method of an embodiment of the present disclosure;
FIG. 3 shows a block diagram of a printer data redirection device of an embodiment of the present disclosure;
fig. 4 shows a block diagram of a printer data redirection device of an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flow chart of a printer data redirection method according to an embodiment of the present disclosure. As shown in fig. 1, the printer data redirection method includes:
step S100, monitoring a print pool task in real time, step S200, acquiring print data when printing is performed through a preset virtual drive, and step S300, performing data cleaning on the print data to generate visual data.
Through real-time supervision print pool task, when printing through predetermineeing virtual drive, acquire the print data, carry out data cleaning to the print data and generate visual data. Therefore, the instruction data capable of identifying cleaning is obtained and sent to the real printer. The process can not affect the printing effect and quality at all, and can also completely identify the content of the merchant printing bill.
Specifically, referring to fig. 1, step S100 is executed to acquire print data from the print pool.
In one possible implementation manner, before performing step S100, the method for redirecting printer data of the present disclosure further includes: and monitoring the print pool task in real time, analyzing the print pool task to obtain a task printer, and acquiring print data when the task printer is a preset virtual drive. For example, a virtual printer driver is installed on a computer with printing service, the operation authority of the printer is set, the "advanced printing function enabled" of the virtual printer driver is started, the virtual printer driver is set as a "default printer", and the computer is operated to print bills through the virtual printer driver, so that the tasks of a printing pool can be monitored.
Further, in a possible implementation, analyzing the print pool task to obtain the task printer includes: shd files are obtained, and the task printer is obtained according to shd files. Specifically, a virtual printer driver is installed on a computer with printing service, the operation authority of the printer is set, the 'starting advanced printing function' of the virtual printer driver is started, the virtual printer driver is set as a 'default printer', the virtual printer driver is used for printing when the computer is operated to print bills, the printing pool task of the computer is monitored through a filter driver, when it is found that the print pool has a job generation, see fig. 2, step S110 is executed, the file shd is first acquired, the document is then parsed shd to obtain the job printer (i.e., the printer designated to print), i.e., step S120 is performed, when the task is printed through a default virtual printer driver, the printer is controlled to pause, print data is collected, namely an spl file is acquired, and then the printer task is controlled to delete the current task.
Further, referring to fig. 1, step S200 is executed to perform data cleansing on the print data to generate visualized data.
In one possible implementation, the data cleansing of the print data to generate the visualization data includes: analyzing the printing data according to a standard printing instruction to obtain printing information after data cleaning, and extracting bill contents from the printing information, wherein the bill contents comprise images and texts. The analyzing the printing data according to the standard printing instruction to obtain the printing information after the data cleaning comprises the following steps: and acquiring the spl file, and analyzing the spl file according to the standard printing instruction to obtain the printing information after data cleaning. For example, installing a virtual printer driver on a computer with a printing service, setting the operation authority of the printer, starting the "advanced printing function" of the virtual printer driver, setting the virtual printer driver as a "default printer", printing through the virtual printer driver when operating the computer to print a bill, monitoring a print pool task of the computer through a filter driver, when a task is found to be generated in the print pool, acquiring shd a file, analyzing shd the file to obtain a task printer (the task printer is a printer designated to print), that is, when the task is printed through the default virtual printer driver, controlling the printer to pause, collecting print data, that is, acquiring a spl file, referring to fig. 2, executing step S210, controlling the printer task to delete the current task, and then parsing the spl file according to a standard print instruction, and removing the part of the printing instruction to obtain the bill content, wherein the bill content can comprise text information and picture information in the receipt.
Further, in a possible implementation manner, the method for redirecting printer data of the present disclosure further includes: and editing the visual data, and editing the edited visual data. Wherein editing the visual data comprises: and acquiring edit data, and editing the visual data according to the edit data to generate new visual data. For example: when the print data is collected, namely the spl file is obtained, then the printer task is controlled to delete the current task, then the spl file is analyzed according to the standard print instruction, the part of the print instruction is removed, and the bill content is obtained, wherein the bill content can comprise the text information and the picture information in the receipt, referring to fig. 2, step S220 is executed, the text information and the picture information in the bill content can be changed, illustratively, a watermark which is made in advance by the user is added to the picture information by using a digital image processing technology, and when the print data is printed once, the watermark is added to the picture information once, so that new visual data can be obtained.
It should be noted that the digital image processing technology can use the conventional technical means in the field, and the detailed description of the disclosure is omitted.
Similarly, the visual data can be edited by adopting a manual editing method, and new visual data can be obtained by manually changing the current bill content.
Further, referring to fig. 1, step S300 is executed to send the visualized data to the printer port for printing.
In a possible implementation manner, a virtual printer driver is installed on a computer with a printing service, the operation authority of the printer is set, the 'starting advanced printing function' of the virtual printer driver is started, the virtual printer driver is set as a 'default printer', when the computer is operated to print bills, the virtual printer driver is used for printing, the printing pool task of the computer is monitored through a filter driver, when a task is found to be generated in the printing pool, shd files are firstly obtained, then shd files are analyzed to obtain a task printer (the task printer is a printer appointed to print), that is, when the task is printed through the default virtual printer driver, the printer is controlled to pause, print data is collected, namely, spl files are obtained, then the printer task is controlled to delete the current task, and then the spl files are analyzed according to a standard printing instruction, and removing the part of the printing instruction to obtain the bill content, wherein the bill content can comprise text information and picture information in the receipt. Adding a watermark which is made in advance by a user on the picture information by using a digital image processing technology, adding the watermark to the picture information once when printing once, so as to obtain new visual data, referring to fig. 2, executing step S310, sending the new visual data to a printer port for printing, executing step S320, obtaining a printer bill, and thus realizing the printing of the merchant bill.
It should be noted that, although the printer data redirection method is described above by taking the above steps as an example, those skilled in the art will understand that the present disclosure should not be limited thereto. In fact, the user can flexibly set the printer data redirection method according to personal preference and/or actual application scenes as long as the functions are achieved.
Like this, through real-time supervision print pool task, when printing through predetermineeing virtual drive, obtain the print data, carry out data cleaning to the print data and generate visual data. Therefore, the instruction data capable of identifying cleaning is obtained and sent to the real printer. The process can not affect the printing effect and quality at all, and can also completely identify the content of the merchant printing bill.
Further, according to another aspect of the present disclosure, a printer data redirection device 100 is also provided. Since the operation principle of the printer data redirection apparatus 100 according to the embodiment of the present disclosure is the same as or similar to that of the printer data redirection method according to the embodiment of the present disclosure, repeated descriptions are omitted. Referring to fig. 3, the printer data redirection apparatus according to the embodiment of the present disclosure includes a print job monitoring module 110, a print data obtaining module 120, and a visualized data generating module 130;
a print job monitoring module 110 configured to monitor print pool jobs in real time;
a print data acquisition module 120 configured to acquire print data when printing by a preset virtual drive;
and the visualized data generation module 130 is configured to perform data cleaning on the printed data to generate visualized data.
Still further, according to another aspect of the present disclosure, there is also provided a printer data redirection device 200. Referring to fig. 4, a printer data redirection device 200 according to an embodiment of the present disclosure includes a processor 210 and a memory 220 for storing instructions executable by the processor 210. Wherein the processor 210 is configured to implement any of the aforementioned printer data redirection methods when executing the executable instructions.
Here, it should be noted that the number of the processors 210 may be one or more. Meanwhile, in the printer data redirection apparatus 200 of the embodiment of the present disclosure, an input device 230 and an output device 240 may also be included. The processor 210, the memory 220, the input device 230, and the output device 240 may be connected via a bus, or may be connected via other methods, which is not limited in detail herein.
The memory 220, which is a computer-readable storage medium, may be used to store software programs, computer-executable programs, and various modules, such as: the printer data redirection method of the embodiment of the disclosure corresponds to a program or a module. The processor 210 executes various functional applications and data processing of the printer data redirection device 200 by running software programs or modules stored in the memory 220.
The input device 230 may be used to receive an input number or signal. Wherein the signal may be a key signal generated in connection with user settings and function control of the device/terminal/server. The output device 240 may include a display device such as a display screen.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by the processor 210, implement the printer data redirection method of any of the preceding.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method for redirecting printer data, comprising:
monitoring the tasks of the printing pool in real time;
acquiring printing data when printing is performed through a preset virtual drive;
and performing data cleaning on the printing data to generate visual data.
2. The method of claim 1, further comprising:
and sending the visual data to a printer port for printing.
3. The method of claim 1, wherein data cleansing the print data to generate visualization data comprises:
analyzing the printing data according to a standard printing instruction to obtain printing information after data cleaning;
extracting bill contents from the printing information; wherein the billing content includes an image and text.
4. The method of claim 1, further comprising: and editing the visual data.
5. The method of claim 4, wherein editing the visualization data comprises:
acquiring edit data;
and editing the visual data according to the editing data to generate new visual data.
6. The method of claim 2, wherein analyzing the print pool job to obtain a job printer comprises:
shd files are obtained;
and obtaining the task printer according to the shd file.
7. The method of claim 3, wherein parsing the print data according to standard print instructions to obtain data-cleaned print information comprises:
acquiring an spl file;
and analyzing the spl file according to a standard printing instruction to obtain the printing information after data cleaning.
8. A printer data redirection device is characterized by comprising a printing task monitoring module, a printing data acquisition module and a visual data generation module;
the printing task monitoring module is configured to monitor the printing pool task in real time;
the printing data acquisition module is configured to acquire printing data when printing is performed through a preset virtual drive;
the visualized data generation module is configured to perform data cleaning on the printing data to generate visualized data.
9. A printer data redirection device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to carry out the executable instructions when implementing the method of any one of claims 1 to 7.
10. A non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1 to 7.
CN202110138491.6A 2021-02-01 2021-02-01 Printer data redirection method and device, equipment and storage medium Pending CN112817546A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110138491.6A CN112817546A (en) 2021-02-01 2021-02-01 Printer data redirection method and device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110138491.6A CN112817546A (en) 2021-02-01 2021-02-01 Printer data redirection method and device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112817546A true CN112817546A (en) 2021-05-18

Family

ID=75861303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110138491.6A Pending CN112817546A (en) 2021-02-01 2021-02-01 Printer data redirection method and device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112817546A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100757393B1 (en) * 2006-08-22 2007-09-11 (주)와우소프트 Printerchaser
CN102968282A (en) * 2012-11-29 2013-03-13 北京风驰韦尔科技有限公司 Method for achieving electronization of any bill and receipt by intercepting print data
CN103218181A (en) * 2012-01-19 2013-07-24 郑州鼎昌计算机科技有限公司 Data safety printing control method based on virtual printer technology
CN103309627A (en) * 2012-03-07 2013-09-18 南京国图信息产业股份有限公司 File double-layer conversion method on basis of printing driving
CN109491623A (en) * 2018-11-14 2019-03-19 北京三快在线科技有限公司 Print data processing method and device, electronic invoice generation method and server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100757393B1 (en) * 2006-08-22 2007-09-11 (주)와우소프트 Printerchaser
CN103218181A (en) * 2012-01-19 2013-07-24 郑州鼎昌计算机科技有限公司 Data safety printing control method based on virtual printer technology
CN103309627A (en) * 2012-03-07 2013-09-18 南京国图信息产业股份有限公司 File double-layer conversion method on basis of printing driving
CN102968282A (en) * 2012-11-29 2013-03-13 北京风驰韦尔科技有限公司 Method for achieving electronization of any bill and receipt by intercepting print data
CN109491623A (en) * 2018-11-14 2019-03-19 北京三快在线科技有限公司 Print data processing method and device, electronic invoice generation method and server

Similar Documents

Publication Publication Date Title
US8045198B2 (en) System and method for processing a change history of a PDF file
CN101387842B (en) Image forming appartus and mehtod, and image forming system
CN102202149B (en) Image display device and display control method
JP5711518B2 (en) Information processing apparatus, control method thereof, and program
JP2000242463A (en) Printing system
JP2017170895A (en) Image formation device and control method thereof, and program
JP5586569B2 (en) Printing system
CN112817546A (en) Printer data redirection method and device, equipment and storage medium
JP2002157097A (en) System for transmission and print of image
JP2007267046A (en) Information processing apparatus, server device, and image processing system with same
KR100788662B1 (en) Document saving and printing system using network and method for the same
JP5836051B2 (en) PRINT CONTROL DEVICE, ITS CONTROL METHOD, AND PROGRAM
JP2009162886A (en) Capture software program and capture device
JP2015089067A5 (en)
CN113608708B (en) Printing preview method and printing preview device based on GDI framework
CN102395000B (en) Device link profile creation method and device link profile creation apparatus
JP7400313B2 (en) Information processing devices, information processing systems, and printer drivers
JP2008123471A (en) Print data processing program and recording medium
JP2007140735A (en) Information processor, image processor, information processing method and image processing method
JP6913284B2 (en) Toner level management system and image forming device
US8312378B2 (en) Universally accessible printer configuration page
JPH11161808A (en) Picture processing method and its device
JP2009054115A (en) Information processing program, information processor, printer, and printing system
JP2007261025A (en) Printing equipment
US20140355036A1 (en) Printing apparatus, terminal apparatus, and non-transitory computer readable recording medium stored with printing program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination