CN112181328A - Printing control system and method and computing device - Google Patents
Printing control system and method and computing device Download PDFInfo
- Publication number
- CN112181328A CN112181328A CN202011367496.8A CN202011367496A CN112181328A CN 112181328 A CN112181328 A CN 112181328A CN 202011367496 A CN202011367496 A CN 202011367496A CN 112181328 A CN112181328 A CN 112181328A
- Authority
- CN
- China
- Prior art keywords
- printing
- file
- target
- operating system
- 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
Links
- 238000007639 printing Methods 0.000 title claims abstract description 166
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000006243 chemical reaction Methods 0.000 claims abstract description 73
- 238000012545 processing Methods 0.000 claims abstract description 63
- 238000004891 communication Methods 0.000 description 21
- 238000010586 diagram Methods 0.000 description 8
- 230000001419 dependent effect Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000013508 migration Methods 0.000 description 2
- 230000005012 migration Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000007723 transport mechanism Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1224—Client or server resources management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1253—Configuration of print job parameters, e.g. using UI at the client
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
The invention discloses a printing control system, wherein one or more applications and a compatible layer compatible with a second operating system are arranged on a first operating system, and the system comprises: the printing service module is suitable for receiving a printing task sent by the application, wherein the printing task comprises a file to be printed and printing setting information, and is suitable for converting the file to be printed into a file with a first format; the format conversion module is connected with the printing service module and is suitable for analyzing the first format file into a second format file; and the printing processing module is adapted to the second operating system, is arranged in the compatible layer, is suitable for generating target printing data based on the second format file and the printing setting information, returns the target printing data to the format conversion module, and then sends the target printing data to the target printer for printing. The invention also discloses a corresponding printing control method and a corresponding computing device. The printing control system can realize the printing of the file based on the printer driver under the Windows system in the Linux operating system.
Description
Technical Field
The present invention relates to the field of computer and network technologies, and in particular, to a print control system, a print control method, and a computing device.
Background
At present, the market coverage rate of the Linux desktop is low, the utilization rate is relatively low, application software developed aiming at the Linux system is relatively lack, and few hardware manufacturers develop native drivers for the Linux. Based on this, a large number of old printers lack Linux native drivers, and after governments and enterprises migrate from Windows to Linux, the situation that a large number of old printers cannot be used occurs, so that not only is resources wasted, but also the progress of replacing Windows by Linux is seriously influenced, the development of Linux desktop is further hindered, and a vicious circle is formed.
If the Linux desktop can reuse the Windows printer driver, the migration process from a Windows system user to the Linux system can be greatly promoted, the market coverage rate and the utilization rate of the Linux desktop can be improved, more printer manufacturers can be promoted to actively develop the native printer driver for the Linux system, and a virtuous circle is formed.
Therefore, a printing control system capable of reusing Windows printer drivers in Linux is needed to solve the problems in the prior art.
Disclosure of Invention
To this end, the present invention provides a print control system, a print control method, and a computing device to solve or at least alleviate the above-existing problems.
According to an aspect of the present invention, there is provided a print control system arranged on a first operating system of a computing device, the first operating system having arranged thereon one or more applications and a compatible layer compatible with a second operating system, the applications being adapted to receive a print request from a user, a print job being generated based on the print request, the system comprising: the printing service module is connected with one or more applications, is suitable for receiving a printing task sent by the applications, comprises a file to be printed and printing setting information, and is suitable for converting the file to be printed into a first format file based on the printing task; the format conversion module is connected with the printing service module and is suitable for acquiring a first format file and printing setting information from the printing service module and analyzing the first format file into a second format file; and the printing processing module is adapted to the second operating system and arranged in the compatible layer, is connected with the format conversion module, is suitable for acquiring a second format file and printing setting information from the format conversion module, generates target printing data based on the second format file and the printing setting information, and is suitable for returning the target printing data to the format conversion module so that the format conversion module sends the target printing data to a corresponding target printer for printing.
Optionally, in the printing control system according to the present invention, further comprising: a printer driver under a second operating system corresponding to the one or more printers, respectively; the printing processing module is suitable for calling a printer driver corresponding to the printing setting information so that the printer driver generates target printing data based on the second format file and the printing setting information.
Optionally, in the print control system according to the present invention, the print processing module is further adapted to: calling the printer driver based on a RAW printing method.
Optionally, in the printing control system according to the present invention, the format conversion module is further adapted to: and after receiving the target printing data, returning the target printing data to the printing service module so that the printing service module sends the target printing data to a corresponding target printer for printing.
Optionally, in the print control system according to the present invention, the print processing module is further adapted to: after generating target printing data, writing the target printing data and corresponding target printer information into a file, and storing the file into a cache; and sending the cached file to a format conversion module.
Optionally, in the print control system according to the present invention, the first operating system is Linux, the print service module is CUPS, and the compatible layer is Wine; the second operating system is Windows.
Optionally, in the printing control system according to the present invention, the first format file is a raster file, and the second format file is a BMP bitmap file.
According to an aspect of the present invention, there is provided a print control method executed in a first operating system of a computing device, the first operating system having disposed thereon one or more applications and a compatible layer compatible with a second operating system, the compatible layer having resident therein a print processing module adapted to the second operating system, the method comprising: the printing service module receives printing tasks sent by one or more applications, wherein the printing tasks comprise files to be printed and printing setting information; the printing service module converts a file to be printed into a first format file based on the printing task; the format conversion module analyzes the first format file into a second format file and sends the second format file and the printing setting information to the printing processing module; the printing processing module generates target printing data based on the second format file and the printing setting information and returns the target printing data to the format conversion module; and the format conversion module sends the target printing data to a corresponding target printer for printing.
Alternatively, in the print control method according to the present invention, the step of the print processing module generating the target print data includes: and the printing processing module calls a printer driver under a second operating system corresponding to the printing setting information so that the printer driver generates target printing data based on the second format file and the printing setting information.
Alternatively, in the print control method according to the present invention, the step of calling a printer driver corresponding to the print setting information includes: calling the printer driver based on a RAW printing method.
Optionally, in the print control method according to the present invention, the step of the format conversion module sending the target print data to the corresponding target printer for printing includes: the format conversion module returns the target printing data to the printing service module; and the printing service module sends the target printing data to a corresponding target printer for printing.
Alternatively, in the print control method according to the present invention, the step of returning the target print data to the format conversion module includes: writing the target printing data and corresponding target printer information into a file, and storing the file in a cache; and sending the cached file to a format conversion module.
Optionally, in the print control method according to the present invention, the first operating system is Linux, the print service module is CUPS, and the compatible layer is Wine; the second operating system is Windows.
Optionally, in the print control method according to the present invention, the first format file is a raster file, and the second format file is a BMP bitmap file.
According to an aspect of the invention, there is provided a computing device comprising: at least one processor; a memory storing program instructions configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the print control method as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a computing apparatus, cause the computing apparatus to execute the print control method as described above.
According to the technical scheme of the invention, by arranging the compatible layer compatible with other operating systems (such as Windows) on the original operating system (such as Linux) in the computing device, the application programs matched with the other operating systems can run on the operating system of the computing device based on the compatible layer. The printing processing module matched with the Windows system is arranged on the compatible layer, the printing processing module can run on the Linux system, the printing processing module can call a printer driver under the Windows system to generate target printing data, the target printing data is sent to the format conversion module, and the target printing data is transmitted to a target printer through the format conversion module and the printing service module to complete printing. Therefore, the printing of the file in the Linux operating system is realized based on the printer driver in the Windows system, so that the printer resource is more reasonably utilized and the resource is saved.
Based on the technical scheme of the invention, the migration of the user of the Windows system to the Linux system can be promoted, and the market coverage rate and the utilization rate of the Linux desktop can be improved, so that more printer manufacturers can be promoted to actively develop the native printer driver for the Linux system to form a virtuous cycle.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a print control system 100 according to one embodiment of the present invention;
FIG. 2 shows a schematic diagram of a computing device 200, according to one embodiment of the invention;
FIG. 3 shows a flow diagram of a print control method 300 according to one embodiment of the invention; and
fig. 4 is a diagram showing communication steps among the format conversion module, the print processing module, and the printer driver according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 shows a schematic diagram of a print control system 100 according to one embodiment of the present invention. The print control system 100 is adapted to execute a print control method.
It should be noted that the print control system 100 may reside in a computing device. The printing control system 100 is arranged on the first operating system of the computing device and is suitable for running on the first operating system. In addition, a compatibility layer 150 and one or more applications 110 are arranged on the first operating system, the one or more applications can run on the first operating system, and the compatibility layer 150 can be compatible with the second operating system. Here, the present invention does not limit the types of the first operating system and the second operating system.
As shown in fig. 1, the print control system 100 includes a print service module 120, a format conversion module 130 connected to the print service module 120, and a print processing module 155. The print processing module 155 resides in the compatibility layer 150 and is communicatively coupled to the format conversion module 130. the print service module 120 is communicatively coupled to one or more applications 110. It should be understood that one or more of the application 110, the print service module 120, the format conversion module 130, and the compatibility layer 150 are all disposed on a first operating system in the computing device.
It should be noted that, the compatible layer 150 is disposed on the first operating system, and is compatible with the second operating system, that is, an application adapted to the second operating system can be compatible, in other words, the application adapted to the second operating system can be implemented to run in the compatible layer 150. Thus, by placing the compatibility layer 150 on the first operating system, applications that are compatible with the second operating system can be made to run on the first operating system.
The print processing module 155 is a program adapted to the second operating system, which is not compatible with the first operating system in the computing device itself and is not adapted to run on the first operating system. Based on the technical scheme of the invention, the compatible layer 150 compatible with the second operating system is arranged in the first operating system, and the printing processing module 155 can be operated in the compatible layer 150 by arranging the printing processing module 155 in the compatible layer 150, so that the printing processing module 155 matched with the second operating system can be operated on the first operating system.
In one embodiment, the first operating system is, for example, Linux, but is not limited thereto. The Printing service module 120 disposed on the first operating System may be implemented as a CUPS (Common UNIX Printing System), where the CUPS is a Printing service framework that can be widely applied to Linux and UNIX systems. The second operating system is, for example, but not limited to, Windows.
In one embodiment, the compatible layer 150 may be implemented as Wine (Wine Is Not an emulator), which Is a compatible layer capable of running Windows applications (i.e., applications adapted to the Windows operating system) on various POSIX-compatible operating systems (e.g., Linux, Mac OS X, BSD, etc.).
In an embodiment of the present invention, the print control system 100 is adapted to execute a print control method. The print control method of the present invention will be described in detail below.
In one embodiment, one or more applications 110 may respond to a user's print request and generate a corresponding print job based on the user's print request, which is then sent to the print service module 120. Here, the print job includes a document to be printed and print setting information.
After the print service module 120 receives the print job (including the file to be printed and the print setting information) sent by the application 110, the print service module 120 converts the file to be printed into a first format file based on the print job, and then sends the generated first format file and the print setting information to the format conversion module 130.
After the format conversion module 130 obtains the first format file and the print setting information from the print service module 120, the format conversion module 130 may parse the first format file into a second format file, and then send the second format file and the print setting information to the print processing module 155 in the compatible layer 150.
In one embodiment, format conversion module 130 is a raster filter. The first format file is a print device-dependent raster file defined by the print service module 120 (CUPS) that contains a PostScript page device dictionary and a device-dependent raster image for each page in the document. The second format file converted by the format conversion module 130 is, for example, a BMP bitmap file.
After acquiring the second format file and the print setting information from the format conversion module 130, the print processing module 155 may generate target print data based on the second format file and the print setting information, return the target print data to the format conversion module 130, and send the target print data to a corresponding target printer for printing by the format conversion module 130. It should be noted that the target print data is a printer language data stream that can be transmitted to the physical printer, and the physical printer can print a file based on the printer language data stream, in other words, the physical printer can print a file based on the target print data.
In one embodiment, format conversion module 130 may return the target print data (printer language data stream) to print service module 120 and print service module 120 sends print service module 120 to the target printer via a data transfer interface.
In embodiments consistent with the invention, a computing device may be communicatively connected to one or more physical printers, for example, by wired or wireless connections. In addition, printer drivers adapted to the second operating system are installed in the computing device and respectively correspond to each physical printer, and each printer driver is arranged on the first operating system of the computing device. In other words, the print control system 100 further includes a printer driver under the second operating system corresponding to each of the one or more physical printers. Note that each printer driver here is a version compatible with the second operating system, cannot directly run in the first operating system, and can be called by the print processing module 155 in the compatible layer 150, so that the printer driver generates target print data based on the second format file and print setting information in the compatible layer 150.
In one embodiment, the print processing module 155 loads the printer driver into the compatible layer 150 to run by calling the printer driver under the second operating system corresponding to the print setting information after receiving the second format file and the print setting information transmitted by the format conversion module 130, so as to generate target print data based on the second format file and the print setting information in the compatible layer using the printer driver. In this way, it is achieved that in the first operating system, the target print data is generated based on the printer driver adapted to the second operating system. Printing of the file can be achieved by transferring target print data generated by the printer driver in the compatible layer to the target printer.
According to one embodiment, the print processing module 155 may call a printer driver based on a RAW print method.
It should be noted that, according to the technical solution in the prior art, after target print data (printer language data stream) is generated by using a printer driver installed with a printer driver adapted to an operating system, the printer driver calls an interface of a corresponding target printer to directly send the printer language data stream to the target printer for printing.
According to the technical solution of the present invention, the print processing module 155 runs in the compatible layer, and the calling of the printer driver to generate the target print data is also completed in the compatible layer, and the printer driver generates the target print data in the compatible layer, and cannot directly send the target print data to the printer, but sends the target print data to the format conversion module 130 based on the communication connection between the compatible layer and the format conversion module, and sends the target print data to the corresponding target printer via the format conversion module 130 for printing. Further, the format conversion module 130 returns the target print data to the print service module 120, and the print service module 120 sends the target print data to the corresponding target printer for printing.
In one embodiment, after the printer driver generates the target print data, the printer driver may write the target print data and corresponding target printer information into a temporary file and store the file in a cache. Further, by sending the cached file to the format conversion module 130, the format conversion module 130 returns the target print data in the cached file to the print service module 120, and then sends the target print data to the target printer.
According to the printing control system 100 of the present invention, the printer driver of the Windows system can be run in the Linux operating system, and the printing of the file can be realized based on the Windows printer driver.
In one embodiment, a computing device on which the print control system 100 resides may be implemented as the computing device 200, so that the print control method of the present invention can be executed in the computing device 200.
FIG. 2 shows a schematic diagram of a computing device 200, according to one embodiment of the invention.
As shown in FIG. 2, in a basic configuration 202, a computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between the processor 204 and the system memory 206.
Depending on the desired configuration, the processor 204 may be any type of processing, including but not limited to: a microprocessor (UP), a microcontroller (UC), a digital information processor (DSP), or any combination thereof. The processor 204 may include one or more levels of cache, such as a level one cache 210 and a level two cache 212, a processor core 214, and registers 216. Example processor cores 214 may include Arithmetic Logic Units (ALUs), Floating Point Units (FPUs), digital signal processing cores (DSP cores), or any combination thereof. The example memory controller 218 may be used with the processor 204, or in some implementations the memory controller 218 may be an internal part of the processor 204.
Depending on the desired configuration, system memory 206 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 206 may include an operating system 220, one or more applications 222, and program data 224. The application 222 is actually a plurality of program instructions that direct the processor 204 to perform corresponding operations. In some embodiments, application 222 may be arranged to cause processor 204 to operate with program data 224 on an operating system.
Computing device 200 also includes storage device 232, storage device 232 including removable storage 236 and non-removable storage 238.
Computing device 200 may also include a storage interface bus 234. The storage interface bus 234 enables communication from the storage devices 232 (e.g., removable storage 236 and non-removable storage 238) to the basic configuration 202 via the bus/interface controller 230. At least a portion of the operating system 220, applications 222, and data 224 may be stored on removable storage 236 and/or non-removable storage 238, and loaded into system memory 206 via storage interface bus 234 and executed by the one or more processors 204 when the computing device 200 is powered on or the applications 222 are to be executed.
Computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to the basic configuration 202 via the bus/interface controller 230. The example output device 242 includes a graphics processing unit 248 and an audio processing unit 250. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 252. Example peripheral interfaces 244 can include a serial interface controller 254 and a parallel interface controller 256, which can be configured to facilitate communications with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 258. An example communication device 246 may include a network controller 260, which may be arranged to facilitate communications with one or more other computing devices 262 over a network communication link via one or more communication ports 264.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in a manner that encodes information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
The print control system 100 is included in the computing device 200 according to the present invention, and the print control system 100 is disposed on the operating system 220 of the computing device 200. The print control system 100 includes a plurality of program instructions that execute the print control method 300, which may instruct the processor 204 to execute the print control method 300 of the present invention such that the print control system 100 executes the print control method 300 of the present invention.
FIG. 3 shows a flow diagram of a print control method 300 according to one embodiment of the invention. The method 300 is suitable for execution in a computing device, such as the computing device 200 described above. Specifically, in an embodiment according to the invention in which the operating system 220 of the computing device 200 is the first operating system, i.e., the first operating system is included in the computing device 200, the method 300 may be performed in the first operating system in the computing device 200. By executing the printing control method 300 of the present invention, it is possible to run the printer driver of another operating system on the original first operating system (e.g., Linux), and to print a file based on the printer driver of another operating system (e.g., Windows).
In an embodiment in accordance with the invention, a print service module 120, a format conversion module 130, and a compatibility layer 150 are disposed on a first operating system of the computing device 200. The compatible layer 150 is disposed on the first operating system and is compatible with the second operating system, that is, compatible with the application program adapted to the second operating system, in other words, the application program adapted to the second operating system can be implemented to run in the compatible layer 150. Thus, by placing the compatibility layer 150 on the first operating system, applications that are compatible with the second operating system can be made to run on the first operating system.
Where a print processing module 155 adapted to the second operating system resides in the compatible layer 150. The print service module 120 is communicatively coupled to the format conversion module 130, and the format conversion module 130 is communicatively coupled to the print processing module 155 in the compatibility layer 150. Also, one or more applications 110 communicatively coupled to the print service module 120 reside in the computing device 200, and the one or more applications 110, disposed on the first operating system, may send print requests for files to the print service module 120.
Note that the print processing module 155 is a program compatible with the second operating system, is not compatible with the first operating system in the computing apparatus 200, and is not suitable for running on the first operating system. Based on the technical scheme of the invention, the compatible layer 150 compatible with the second operating system is arranged in the first operating system, and the printing processing module 155 can be operated in the compatible layer 150 by arranging the printing processing module 155 in the compatible layer 150, so that the printing processing module 155 matched with the second operating system can be operated on the first operating system.
According to one embodiment, the first operating system is, for example, Linux, but is not limited thereto. The print service module 120 disposed on the first operating system may be implemented as a CUPS, which is a print service framework that can be widely applied to Linux and Unix systems. The second operating system is, for example, but not limited to, Windows.
According to one embodiment, the compatible layer 150 may be implemented as Wine (Wine Is Not an emulator), which Is a compatible layer capable of running Windows applications (i.e., applications adapted to the Windows operating system) on various POSIX-compatible operating systems (e.g., Linux, Mac OS X, BSD, etc.).
As shown in fig. 3, the method 300 begins at step S310.
In step S310, the print service module 120 receives a print job sent by one or more applications 110, where the print job includes a file to be printed and print setting information. Here, the one or more applications 110 are, for example, various applications that can generate print jobs, including but not limited to WPS, browser. One or more applications are connected to the print service module 120, and the applications may respond to a print request of a user and generate a corresponding print job based on the print request of the user, and further, the application 110 may send the print job including a file to be printed and print setting information to the print service module 120, and the print job is received by the print service module 120.
Subsequently, in step S320, the printing service module 120 converts the file to be printed into a first format file based on the print job, and transmits the first format file and the print setting information to the format conversion module 130.
Further, in step S330, the format conversion module 130 parses the first format file into a second format file, and transmits the second format file and the print setting information to the print processing module 155.
Subsequently, in step S340, the print processing module 155, upon receiving the second format file and the print setting information sent by the format conversion module 130, generates target print data based on the second format file and the print setting information, and returns the target print data to the format conversion module 130.
Finally, in step S350, the format conversion module 130 sends the target print data to the corresponding target printer for printing after acquiring the target print data from the print processing module 155. It should be noted that the target print data is a printer language data stream that can be transmitted to the physical printer, where the physical printer can print a file based on the printer language data stream, in other words, the physical printer can print a file based on the target print data.
In one embodiment, format conversion module 130 may return the target print data (printer language data stream) to print service module 120 and print service module 120 sends print service module 120 to the target printer via a data transfer interface.
According to embodiments of the invention, computing device 200 may be communicatively coupled to one or more physical printers, for example, by wired or wireless connections. In addition, a printer driver adapted to the second operating system is installed in the computing device 200 corresponding to each physical printer, and each printer driver is disposed on the first operating system of the computing device. Note that each printer driver here is a version compatible with the second operating system and thus cannot directly run in the first operating system, and can be called by the print processing module 155 in the compatible layer 150 so that the printer driver generates target print data based on the second format file and print setting information in the compatible layer 150.
According to one embodiment, the print processing module 155 loads the printer driver into the compatible layer 150 to run by calling the printer driver under the second operating system corresponding to the print setting information after receiving the second format file and the print setting information transmitted by the format conversion module 130, so as to generate target print data based on the second format file and the print setting information in the compatible layer using the printer driver. In this way, it is achieved that in the first operating system, the target print data is generated based on the printer driver adapted to the second operating system. Printing of the file can be achieved by transferring target print data generated by the printer driver in the compatible layer to the target printer.
According to one embodiment, the print processing module 155 may call a printer driver based on a RAW print method.
It should be noted that, according to the technical solution in the prior art, after target print data (printer language data stream) is generated by using a printer driver installed with a printer driver adapted to an operating system, the printer driver calls an interface of a corresponding target printer to directly send the printer language data stream to the target printer for printing.
According to the technical solution of the present invention, the print processing module 155 runs in the compatible layer, and the generation of the target print data by calling the printer driver is also completed in the compatible layer, and the printer driver generates the target print data in the compatible layer, and cannot directly send the target print data to the printer, but sends the target print data to the format conversion module 130 based on the communication connection between the compatible layer and the format conversion module, and the format conversion module 130 sends the target print data to the corresponding target printer for printing. Further, the format conversion module 130 returns the target print data to the print service module 120, and the print service module 120 sends the target print data to the corresponding target printer for printing.
According to one embodiment, the format conversion module 130 is a raster filter. The first format file is a print device-dependent raster file defined by the print service module 120 (CUPS) that contains a PostScript page device dictionary and a device-dependent raster image for each page in the document. The second format file converted by the format conversion module 130 is a BMP bitmap file.
Fig. 4 is a diagram showing communication steps among the format conversion module, the print processing module, and the printer driver according to an embodiment of the present invention.
As shown in fig. 4, the format conversion module 130 (raster filter) converts the raster file into a BMP bitmap file after receiving the raster file and the print setting information sent by the print service module 120. Further, the print processing module 155 is started up through the compatible layer Wine and takes over its standard input/standard input (stdin/stdout). The print processing module 155 in the compatible layer can receive the BMP bitmap file and the print setting information transmitted from the format conversion module 130 at the standard input. Further, the print processing module 155 loads a Windows printer driver (printer driver return printer handle) corresponding to the print setting information based on OpenPrinter, and controls the printer driver to call the WritePrinter interface to draw a BMP (printer driver return drawing context handle) in the printer context based on CreateDC. Here, the WritePrinter is an interface provided by the Windows spooller printing service for a printer driver to transmit data to a printer. After the drawing is completed by the Windows printer driver, the print processing module 155 controls the printer driver to prepare for printing and display the BMP in the driver drawing context based on the StartDoc. Subsequently, the printer driver generates a printer language data stream based on the BMP bitmap file and the print setting information, and the print processing module 155 controls the printer driver to end printing based on the EndDoc. It should be understood that the printer driver performing the above-described operations is also implemented in the compatible layer, and the print processing module 155 streams the printer language data generated in the compatible layer to the format conversion module 130 based on the standard output (stdout).
The format conversion module 130 (raster filter) may return the printer language data stream to the print service module 120 after obtaining the printer language data stream so that the print service module 120 transmits the data to the target printer for printing.
According to one embodiment, after generating the target print data, the printer driver may write the target print data and corresponding target printer information into a temporary file, store the file in a cache, and record a correspondence between the cache file and the target printer. Further, the print processing module sends the cached file to the format conversion module 130 based on the standard output, and the format conversion module 130 returns the target print data in the cached file to the print service module 120, and then sends the target print data to the target printer.
According to the print control method 300 of the present invention, by arranging a compatible layer compatible with a second operating system (Windows) on a first operating system (Linux) in a computing device, an application program adapted to the second operating system can be made to run on the first operating system based on the compatible layer. The printing processing module matched with the Windows system is arranged on the compatible layer, the printing processing module can run on the Linux system, the printing processing module can call a printer driver under the Windows system to generate target printing data, the target printing data is sent to the format conversion module, and the target printing data is transmitted to a target printer through the format conversion module and the printing service module to complete printing. Therefore, the printing of the file in the Linux operating system is realized by the printer driver based on the Windows system.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the print control method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense with respect to the scope of the invention, as defined in the appended claims.
Claims (10)
1. A print control system disposed on a first operating system of a computing device, the first operating system having disposed thereon one or more applications and a compatible layer compatible with a second operating system, the system comprising:
the printing service module is connected with one or more applications, is suitable for receiving a printing task sent by the applications, comprises a file to be printed and printing setting information, and is suitable for converting the file to be printed into a first format file based on the printing task;
the format conversion module is connected with the printing service module and is suitable for acquiring a first format file and printing setting information from the printing service module and analyzing the first format file into a second format file; and
and the printing processing module is connected with the format conversion module, is suitable for acquiring a second format file and printing setting information from the format conversion module, generates target printing data based on the second format file and the printing setting information, and is suitable for returning the target printing data to the format conversion module so that the format conversion module sends the target printing data to a corresponding target printer for printing.
2. The print control system of claim 1, further comprising: a printer driver under a second operating system corresponding to the one or more printers, respectively;
the printing processing module is suitable for calling a printer driver corresponding to the printing setting information so that the printer driver generates target printing data based on the second format file and the printing setting information.
3. The print control system of claim 2, wherein the print processing module is further adapted to:
calling the printer driver based on a RAW printing method.
4. The print control system of any of claims 1-3, wherein the format conversion module is further adapted to:
and after receiving the target printing data, returning the target printing data to the printing service module so that the printing service module sends the target printing data to a corresponding target printer for printing.
5. The print control system of any of claims 1-3, wherein the print processing module is further adapted to:
after generating target printing data, writing the target printing data and corresponding target printer information into a file, and storing the file into a cache;
and sending the cached file to a format conversion module.
6. The print control system according to any one of claims 1 to 3,
the first operating system is Linux, the printing service module is CUPS, and the compatible layer is Wine;
the second operating system is Windows.
7. A print control method executed in a first operating system of a computing device, the first operating system having disposed thereon one or more applications and a compatible layer compatible with a second operating system, the compatible layer having resident therein a print processing module adapted to the second operating system, the method comprising:
the printing service module receives printing tasks sent by one or more applications, wherein the printing tasks comprise files to be printed and printing setting information;
the printing service module converts a file to be printed into a first format file based on the printing task;
the format conversion module analyzes the first format file into a second format file and sends the second format file and the printing setting information to the printing processing module;
the printing processing module generates target printing data based on the second format file and the printing setting information and returns the target printing data to the format conversion module; and
and the format conversion module sends the target printing data to a corresponding target printer for printing.
8. The method of claim 7, wherein the step of the print processing module generating the target print data comprises:
and the printing processing module calls a printer driver under a second operating system corresponding to the printing setting information so that the printer driver generates target printing data based on the second format file and the printing setting information.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 7-8.
10. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 7-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011367496.8A CN112181328B (en) | 2020-11-30 | 2020-11-30 | Printing control system and method and computing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011367496.8A CN112181328B (en) | 2020-11-30 | 2020-11-30 | Printing control system and method and computing device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112181328A true CN112181328A (en) | 2021-01-05 |
CN112181328B CN112181328B (en) | 2021-05-04 |
Family
ID=73918261
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011367496.8A Active CN112181328B (en) | 2020-11-30 | 2020-11-30 | Printing control system and method and computing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112181328B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112764694A (en) * | 2021-01-13 | 2021-05-07 | 统信软件技术有限公司 | Printing system, printing method and computing device |
CN113312013A (en) * | 2021-06-03 | 2021-08-27 | 苏州博瑞凯德信息技术有限公司 | Printing method, printing system and storage medium |
CN113741832A (en) * | 2021-09-07 | 2021-12-03 | 苏州博瑞凯德信息技术有限公司 | Printer configuration method and device based on interaction and electronic equipment |
CN114564158A (en) * | 2022-04-24 | 2022-05-31 | 北京圣博润高新技术股份有限公司 | Method, device, equipment and medium for controlling document printing under Linux system |
CN114579065A (en) * | 2022-01-21 | 2022-06-03 | 福建升腾资讯有限公司 | Printer redirection method and system of cloud desktop |
CN114721606A (en) * | 2022-02-28 | 2022-07-08 | 阿里巴巴(中国)有限公司 | Cloud desktop printing processing method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1661560A (en) * | 2004-02-25 | 2005-08-31 | 英特维数位科技股份有限公司 | Architecture of operation system for sharing application programs and method |
EP2720137A2 (en) * | 2012-10-12 | 2014-04-16 | Samsung Electronics Co., Ltd | Method of printing content shared between applications and computing apparatus to perform the method |
CN107329916A (en) * | 2017-06-13 | 2017-11-07 | 北京深之度科技有限公司 | A kind of USB device control method, device and computing device |
CN110647300A (en) * | 2019-09-02 | 2020-01-03 | 深圳市特康生物工程有限公司 | Method for using printer by android platform QT program |
-
2020
- 2020-11-30 CN CN202011367496.8A patent/CN112181328B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1661560A (en) * | 2004-02-25 | 2005-08-31 | 英特维数位科技股份有限公司 | Architecture of operation system for sharing application programs and method |
EP2720137A2 (en) * | 2012-10-12 | 2014-04-16 | Samsung Electronics Co., Ltd | Method of printing content shared between applications and computing apparatus to perform the method |
CN107329916A (en) * | 2017-06-13 | 2017-11-07 | 北京深之度科技有限公司 | A kind of USB device control method, device and computing device |
CN110647300A (en) * | 2019-09-02 | 2020-01-03 | 深圳市特康生物工程有限公司 | Method for using printer by android platform QT program |
Non-Patent Citations (2)
Title |
---|
MR_JOHN_LIANG: "Linux打印系统CUPS原理分析", 《CSDN论坛》 * |
YAKOO5: "Wine 中文官方用户指南", 《CSDN论坛》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112764694A (en) * | 2021-01-13 | 2021-05-07 | 统信软件技术有限公司 | Printing system, printing method and computing device |
CN113312013A (en) * | 2021-06-03 | 2021-08-27 | 苏州博瑞凯德信息技术有限公司 | Printing method, printing system and storage medium |
CN113741832A (en) * | 2021-09-07 | 2021-12-03 | 苏州博瑞凯德信息技术有限公司 | Printer configuration method and device based on interaction and electronic equipment |
CN114579065A (en) * | 2022-01-21 | 2022-06-03 | 福建升腾资讯有限公司 | Printer redirection method and system of cloud desktop |
CN114721606A (en) * | 2022-02-28 | 2022-07-08 | 阿里巴巴(中国)有限公司 | Cloud desktop printing processing method and system |
WO2023160404A1 (en) * | 2022-02-28 | 2023-08-31 | 阿里巴巴(中国)有限公司 | Cloud desktop printing processing method and system |
CN114564158A (en) * | 2022-04-24 | 2022-05-31 | 北京圣博润高新技术股份有限公司 | Method, device, equipment and medium for controlling document printing under Linux system |
CN114564158B (en) * | 2022-04-24 | 2022-07-15 | 北京圣博润高新技术股份有限公司 | Method, device, equipment and medium for controlling document printing under Linux system |
Also Published As
Publication number | Publication date |
---|---|
CN112181328B (en) | 2021-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112181328B (en) | Printing control system and method and computing device | |
JP7355147B2 (en) | application program | |
US8743389B2 (en) | Methods and systems rendering a print job | |
US8891115B2 (en) | Configuration of print data for print jobs based on document-processing capabilities of printers | |
CN112764694A (en) | Printing system, printing method and computing device | |
US8526049B2 (en) | Systems and methods for display list management | |
US20060028670A1 (en) | Image processing apparatus and its method | |
CN107256134B (en) | Method and device for virtualizing POS terminal as computer printer and POS terminal | |
US9286553B2 (en) | Image forming method, non-transitory computer readable storage medium stored with program for image forming system, and image forming system | |
KR100490412B1 (en) | Method of controlling printing job schedule and print system employing the same | |
US11659125B2 (en) | Non-transitory computer readable storage medium, information processing device and printing method for collate printing | |
CN114880136A (en) | Scanner using method and device, computing equipment and storage medium | |
US9691010B2 (en) | Information processing apparatus, distributed printing system, and method of controlling printing | |
US20040075859A1 (en) | Printer instruction processing | |
CN113900603B (en) | Analog printing method, computing device and storage medium | |
US8643861B2 (en) | Image processing apparatus, data processing method of image processing apparatus, and storage medium for performing multitask processing and single task processing while interpreting PDL data | |
US20210216250A1 (en) | Support program, information processing device, and printing method | |
CN112256214A (en) | Job cancel printing method, image forming apparatus, image forming system, and computer storage medium | |
JP3209916B2 (en) | Information processing apparatus and data processing method of information processing apparatus | |
JP2022090784A (en) | Edge device, program, and edge device control method | |
JP2013242816A (en) | Dsp card and data transfer method | |
US11960779B1 (en) | Document printing in a virtualized computing environment | |
JP7124447B2 (en) | Translators, printing systems and programs | |
US20190286394A1 (en) | Information processing apparatus, information processing method, and recording medium | |
CN113448519A (en) | Method for printing file |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |