CN111596873B - File processing method and device to be printed, file printing control method and device - Google Patents
File processing method and device to be printed, file printing control method and device Download PDFInfo
- Publication number
- CN111596873B CN111596873B CN202010472869.1A CN202010472869A CN111596873B CN 111596873 B CN111596873 B CN 111596873B CN 202010472869 A CN202010472869 A CN 202010472869A CN 111596873 B CN111596873 B CN 111596873B
- Authority
- CN
- China
- Prior art keywords
- file
- printed
- image object
- printing
- 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.)
- Active
Links
- 238000007639 printing Methods 0.000 title claims abstract description 143
- 238000000034 method Methods 0.000 title claims abstract description 83
- 238000003672 processing method Methods 0.000 title claims description 11
- 238000012545 processing Methods 0.000 claims abstract description 85
- 238000006243 chemical reaction Methods 0.000 claims description 24
- 238000005457 optimization Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 11
- 230000006835 compression Effects 0.000 claims description 6
- 238000007906 compression Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
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/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1242—Image or content composition onto a page
- G06F3/1243—Variable data printing, e.g. document forms, templates, labels, coupons, advertisements, logos, watermarks, transactional printing, fixed content versioning
-
- 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/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
- G06F3/1208—Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
-
- 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/1244—Job translation or job parsing, e.g. page banding
-
- 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/1244—Job translation or job parsing, e.g. page banding
- G06F3/1247—Job translation or job parsing, e.g. page banding by conversion to printer ready format
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)
- Quality & Reliability (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
The invention relates to a method and a device for processing a file to be printed, a method and a device for controlling file printing, a readable storage medium and electronic equipment. The file printing control method comprises the following steps: acquiring a file to be printed; identifying an image object in the file to be printed; judging whether the image object has preset attributes or not; if the image object has the preset attribute, optimizing at least the image object part of the file to be printed to obtain a processed printed file; converting the processed print file into a first print file; and sending the first printing file to a printing device to control the printing device to print.
Description
Technical Field
The present invention relates to the field of image forming technologies, and in particular, to a method and apparatus for processing a file to be printed, a method and apparatus for controlling file printing, a readable storage medium, and an electronic device.
Background
The printing apparatus generally prints print data supplied from an electronic apparatus such as a computer or the like on a recording medium. Such a printing apparatus may include: a copying machine, a printer, a facsimile machine, a multifunction peripheral (MFP) that integrates functions of a copying machine, a printer, a facsimile machine into a single system, or the like.
When such a printing apparatus performs printing, the following steps are generally required to perform the completion of printing: such as operating an electronic device, launching various applications for generating print data, converting the print data into a language that the printing device is capable of interpreting, and transmitting the translated print data to the printing device.
As is apparent from the above, in order to obtain a desired print in response to a print command input by a user, it is necessary to convert the original print data processing into translated print data and transmit the translated print data to a printing apparatus. However, when the original print data document contains a picture object with a special attribute (e.g., a picture object with a mask), print data with high complexity and poor image effect is generated by direct processing, and if the print data is directly sent to the printing device, the processing time of the printing device may be long and the printing effect may be poor.
Disclosure of Invention
In view of the above, in order to at least partially improve the above problems, the present invention provides a method and apparatus for processing a document to be printed, a method and apparatus for controlling printing of a document, a readable storage medium, and an electronic device.
In order to achieve the above object, the following scheme is adopted in the embodiment of the present invention.
In a first aspect, an embodiment of the present invention provides a method for processing a file to be printed, including:
acquiring a file to be printed;
identifying an image object in the file to be printed;
judging whether the image object has preset attributes or not; and
And if the image object has the preset attribute, optimizing at least the image object part of the file to be printed to obtain the processed printed file.
In a second aspect, an embodiment of the present invention provides a file printing control method, including:
acquiring a file to be printed;
identifying an image object in the file to be printed;
judging whether the image object has preset attributes or not;
if the image object has the preset attribute, optimizing at least the image object part of the file to be printed to obtain a processed printed file;
converting the processed print file into a first print file; and
And sending the first printing file to a printing device to control the printing device to print.
In a third aspect, an embodiment of the present invention provides a document processing apparatus to be printed, including:
the acquisition module is used for acquiring the file to be printed;
The identification module is used for identifying the image object in the file to be printed;
the judging module is used for judging whether the image object has preset attributes or not; and
And the file processing module is used for carrying out optimization processing on at least the image object part of the file to be printed when the image object has the preset attribute so as to obtain the processed printed file.
In a fourth aspect, an embodiment of the present invention provides a document print control apparatus, including:
the acquisition module is used for acquiring the file to be printed;
the identification module is used for identifying the image object in the file to be printed;
the judging module is used for judging whether the image object has preset attributes or not;
the file processing module is used for carrying out optimization processing on at least the image object part of the file to be printed when the image object has the preset attribute so as to obtain a processed printed file;
the conversion module is used for converting the processed printing file into a first printing file and converting the file to be printed into a second printing file when the image object does not have the preset attribute; and
And the sending module is used for sending the first printing file to the printing equipment to control the printing equipment to print and sending the second printing file to the printing equipment to control the printing equipment to print.
In a fifth aspect, embodiments of the present invention provide a readable storage medium storing a computer program for implementing the method according to any one of the embodiments of the first to second aspects, when the computer program is executed by a processor.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including a memory, and a processor, where the memory stores a computer program, and the processor executes the method according to any one of the embodiments of the first to second aspects.
In the method and device for processing the file to be printed, the method and device for controlling file printing, the readable storage medium and the electronic equipment, by identifying and judging whether the image object in the file to be printed has the preset attribute, when the image object has the preset attribute, at least the image object part of the file to be printed is subjected to optimization processing, so that the generation of printing data with high complexity and poor image effect due to the existence of the preset attribute is avoided, the generated printing data has low complexity and good image effect, the printing speed is improved, the problem that the preset attribute influences the image quality of the printed file is improved, and the printed file image is smoother and purer.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a file printing control method according to an embodiment of the present invention.
Fig. 2 is a flow chart of a file print control method according to an embodiment of the present invention.
Fig. 3 (a) is a schematic diagram of an image object to be printed file containing preset attributes.
Fig. 3 (B) is a schematic view of an image object of the document to be printed shown in fig. 3 (a).
Fig. 4 is a flowchart of a processing method of a document to be printed according to an embodiment of the present invention.
Fig. 5 is a flowchart of a processing method of a document to be printed according to another embodiment of the present invention.
Fig. 6 is a block diagram of a document print control apparatus according to an embodiment of the present invention.
Fig. 7 is a block diagram of a document processing apparatus to be printed according to an embodiment of the present invention.
Fig. 8 is a block diagram of a document processing apparatus to be printed according to another embodiment of the present invention.
Fig. 9 is a diagram of experimental data record of the file printing control method and apparatus of the present invention.
Fig. 10 is a block diagram of an electronic device of an embodiment of the invention.
Detailed Description
The terms first, second, third and the like in the description and in the claims of the invention and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1 and 2, fig. 1 is a flowchart of a file printing control method according to an embodiment of the invention, and fig. 2 is a simplified flowchart of a file printing control method according to an embodiment of the invention. By the file printing control method, a file to be printed or an initial file of the file to be printed is processed, so that a printer file is generated and sent to a printing device for controlling the printing device to print. The file printing control method may be run on an electronic device, and the electronic device includes, but is not limited to, a computer, a personal computer, a notebook computer, a tablet computer, a web server, a mobile phone, a personal digital assistant, an intelligent wearable device, a printing auxiliary device connected between a client and a printing device, and the like. The printing device may include, but is not limited to: a copying machine, a printer, a facsimile machine, a multifunction peripheral (MFP) that integrates functions of a copying machine, a printer, a facsimile machine into a single system, or the like.
Specifically, the file printing control method includes the following steps S11 to S15.
Step S11, obtaining a file to be printed. Specifically, the step S11 may be executed in the electronic device, and in one embodiment, an application program of the electronic device obtains an initial file and converts the initial file into the file to be printed in a preset format, so that the application program (such as a print driver) of the electronic device may obtain the file to be printed in the preset format. Thus, the step S11 may include: acquiring an initial file; and converting the initial file into the file to be printed in a preset format.
Wherein the initial file may have a different format, such as WORD, EXCEL, PPT, PDF (portable file mode, portable Document Format), etc., and the preset format of the file to be printed includes PDF but is not limited to PDF. Of course, it can be understood that, in some embodiments, some application programs (such as office software WPS) of the electronic device may also directly generate the file to be printed in the preset format, and correspondingly, in step S11, an application program (such as a print driver, but not limited to this) of the electronic device may directly receive and obtain the file to be printed in the preset format without performing format conversion.
In addition, in some embodiments, the electronic device may also receive a file to be printed sent by an external device or a network server, or receive an initial file (such as an initial file in a WORD format) sent by an external device (such as an external other electronic device) or a network server, and convert the initial file into a preset format (such as through WPS office software) so as to obtain the file to be printed in the preset format (such as the file to be printed in a PDF format). In addition, in some embodiments, the electronic device may also generate the initial file, where the initial file is provided to an external device or a network server and converted into the file to be printed in a preset format (such as the file to be printed in a PDF format), and the file to be printed in the preset format is returned to the electronic device, so that the electronic device obtains the file to be printed.
Step S12, identifying the image object in the file to be printed. The file to be printed may include an image object, a text object, etc., and specifically, in step S12, the image object in the file to be printed may be identified by analyzing the file to be printed. Further, when the file to be printed is in a PDF format, the image objects in the file to be printed can be identified by an internal PDF identification analysis module or other PDF identification analysis application programs, and the PDF identification analysis module or the PDF identification analysis application program can identify all the image objects in the file to be printed.
Step S13, judging whether the image object has preset attributes. The predetermined attribute may be a mask, that is, in step S13, it is determined whether the image object of the document to be printed is an image object with a mask, and it is understood that the image object with a mask generally includes a main image and a mask. The mask may have different transparency in the range of 0% -100% and may be disposed on the main image to mask the main image to different degrees. As shown in fig. 3 (a), fig. 3 (a) is a schematic diagram of a file to be printed including an image object with a preset attribute, the file to be printed may include an image object and a text object, and the whole file to be printed is analyzed in step S12 to identify the image object of the file to be printed, as shown in fig. 3 (B), fig. 3 (B) is a schematic diagram of the image object of the file to be printed; further, through the step S13, it is determined whether the image object has the preset attribute, specifically, as shown in fig. 3 (B), the determination may be performed by querying to learn a mask type in the picture details of the image object, if the mask type in the picture details is an external mask, it is determined that the image object has the preset attribute of the mask, and then step S14 may be further performed.
Step S14, if the image object has the preset attribute, performing optimization processing on at least the image object portion of the file to be printed to obtain a processed print file.
In one embodiment, in step S14, the whole of the to-be-printed file may be subjected to optimization processing to obtain the processed printed file. In other embodiments, in the step S14, the image object portion of the file to be printed may be optimized, and the processed image object may be replaced with the original image object to obtain the processed print file.
Specifically, in the step S14, the optimizing may include at least one of removing transparency and reducing a compression rate, that is, the step of optimizing at least the image object portion of the file to be printed may include: at least one of the steps of removing transparency from at least the image object portion of the document to be printed and reducing compression rate from at least the image object portion of the document to be printed. The transparency is removed to enhance the image quality and improve the printing speed; the reduced compression rate is used to save decompression time. In addition, the optimizing process may further include a step of performing image preprocessing optimization of at least the image object portion before performing at least one of removing transparency and reducing a compression rate.
Further, when the step of removing the transparency is performed, it may be first determined whether the image object portion has only the bottommost image or has no covering relationship, and if so, the step of removing the transparency may be performed to remove the transparency of the image object portion. That is, the step of optimizing at least the image object portion of the file to be printed may include: and judging whether the image object part has the bottommost image or has no covering relation, and if so, executing the step of removing transparency of at least the image object part of the file to be printed.
Still further, the step of removing transparency from at least the image object portion of the document to be printed may specifically include at least one of the following three modes (e.g., using one of them, overlapping any two of them, or overlapping all three of them):
(1) Removing transparency from at least the image object portion by invoking a file format conversion module (e.g., ghostScript);
(2) Removing transparency of at least the image object portion by a PDF processing module;
(3) Performing screenshot processing on at least the image object part to obtain a screenshot image, and covering the screenshot image on at least the image object part so as to remove transparency on at least the image object part;
Still further, the above manner (3) may further perform, before the step of removing transparency from at least the image object portion of the document to be printed, the following determination step: judging whether a file format conversion module (such as GhostScript) or a PDF processing module can be called to remove transparency of at least the image object part, and if not, executing the step of the mode (3) again: and performing screenshot processing on at least the image object part to obtain a screenshot image, and covering the screenshot image on at least the image object part so as to remove transparency on at least the image object part. It will be appreciated that the file format conversion module GhostScript is a file format conversion module that is self-contained in the operating system of a general electronic device. The format of the processed print file includes PostScript format extended by PS but is not limited to the above.
Step S15, converting the processed print file into a first print file. The first print file is for being sent to a printing device to control the printing device to print. It will be appreciated that the first print file may have a language in which the printing device is able to directly receive and execute a print job in accordance with the first print file, i.e. the first print file may be identified and directly printed by the printing device. Specifically, the extension of the first print file may be PRN, but is not limited to the above.
And step S16, the first printing file is sent to a printing device to control the printing device to print. Further, it can be understood that, in the file printing control method, the determination result in the step S13 may also be: the image object does not have a preset attribute, e.g., the image object does not have a mask, and thus the file print control method may further include steps S17 and S18.
And S17, if the image object does not have the preset attribute, converting the file to be printed into a second print file. The second print file is for being sent to the printing device to control the printing device to print. It will be appreciated that the second print file may have a language in which the printing device is able to directly receive and execute a print job in dependence upon the second print file, i.e. the second print file may be identified and directly printed by the printing device. Specifically, the second print file may be in the same format as the first print file, such as the PRN format, but is not limited to the above format.
And step S18, the second printing file is sent to the printing equipment to control the printing equipment to print. The step S18 may be performed by a print driver of the electronic device, but is not limited thereto. It can be understood that the first print file and the second print file may be both sent to the same printing device, and of course, may also be sent to different printing devices, and may be set according to the needs of the client.
In addition, it should be understood that the steps S11-S18 may be executed by the print driver of the electronic device, but are not limited thereto, and may be executed by an application program such as an office of the electronic device, a print driver, and/or other internal and external application programs, which are not exhaustive.
As can be seen from the foregoing, in the file printing control method according to the embodiment of the present invention, the first print file or the second print file is finally generated and sent to the printing device by acquiring and processing the file to be printed or the initial file of the file to be printed, so as to control the printing device to print, thereby completing the control of file printing.
However, the embodiment of the present invention also provides a method for processing a file to be printed, where the method for processing a file to be printed may include part of the steps (such as steps S11-S14, or steps S11-S15, or steps S11-15 and S17) in the method for controlling file printing in the foregoing embodiment, so that the file to be printed or an initial file of the file to be printed is processed to generate the processed print file, or the first print file, or the second print file. The processing method of the file to be printed can generate the processed print file, the first print file or the second print file, wherein the processed print file can be further provided with other electronic equipment or a network server so as to be further converted into the first print file; the first printing file can also be sent to other electronic equipment or a network server and the like, and according to actual needs, the other electronic equipment or the network server can send the first printing file to the printing equipment so as to control the printing equipment to print; the second print file may be sent to other electronic devices or network servers, etc., and according to actual needs, the other electronic devices or network servers may send the first print file to the print device, so as to control the print device to print. It can be understood that the first print file and the second print file may be both sent to the same printing device, and of course, may also be sent to different printing devices, and may be set according to the needs of the client.
The method for processing the file to be printed in the embodiment of the invention can also be operated on electronic equipment, wherein the electronic equipment comprises, but is not limited to, a computer, a personal computer, a notebook computer, a tablet computer, a network server, a mobile phone, a personal digital assistant, an intelligent wearing equipment, a printing auxiliary equipment connected between a client and a printing equipment and the like. The printing apparatus may include: a copying machine, a printer, a facsimile machine, a multifunction peripheral (MFP) that integrates functions of a copying machine, a printer, a facsimile machine into a single system, or the like.
As shown in fig. 4, in one embodiment, the method for processing the document to be printed includes steps S11-S14 and step S15'.
Step S11, obtaining a file to be printed.
Step S12, identifying the image object in the file to be printed.
Step S13, judging whether the image object has preset attributes.
Step S14, if the image object has the preset attribute, performing optimization processing on at least the image object portion of the file to be printed to obtain a processed print file.
Step S15', if the image object does not have the preset attribute, outputting the file to be printed, or outputting an instruction that the file to be printed does not have the preset attribute, or outputting an instruction that the file to be printed does not need to be processed.
The steps S11-S14 have been described in detail in the above embodiments of the file printing control method, and will not be described herein.
It will be appreciated that, in the step S15', if the image object does not have the preset attribute, the file to be printed may be directly output without processing the file to be printed, or an instruction that the file to be printed does not have the preset attribute, or an instruction that the file to be printed does not need to be processed may be output, and the file to be printed may be used to be converted into a printer file (such as a second print file) that is understandable and executable by the printing device.
In addition, it can be understood that the method for processing a file to be printed in the embodiment shown in fig. 4 may be built in a print driver of an electronic device, as in the embodiment shown in fig. 1, and the method for controlling printing a file may be executed by the print driver of the electronic device and includes most or all of the steps in the embodiment shown in fig. 4, so that the foregoing is described in detail with respect to the embodiment shown in fig. 1, and will not be repeated herein.
Further, the method for processing a file to be printed in the embodiment shown in fig. 4 may also be executed by a file processing device to be printed (such as an application program for processing a file to be printed) of an electronic device, for example, the file processing device to be printed may receive a file to be printed or an initial file generated by an application program (such as a WPS application program), generate and output a processed print file in step S14 to another application program (such as a scan driver), return an instruction that the file to be printed or the file to be printed does not need to be processed to another application program (such as a scan driver), and further convert the processed print file or the file to be printed into the first print file or the second print file by another application program (such as a scan driver), and send the print file to the printing device to control the printing device to print.
Still further, the method for processing a file to be printed in the embodiment shown in fig. 4 may also be executed in an electronic device, where the method is executed by a file processing device to be printed (such as an application program for processing a file to be printed) of the electronic device, and the electronic device may also communicate with electronic devices of other clients, such as receive a file to be printed or an initial file sent by the electronic device of the other clients, generate and output the processed print file in step S14 to the electronic device of the other clients, return an instruction that the file to be printed or the file to be printed does not need to be processed to the electronic device of the other clients, and further convert the processed print file or the file to be printed into the first print file or the second print file by the electronic device of the other clients, and send the first print file or the second print file to the print device to control the print device to print.
As shown in fig. 5, in one embodiment, the method for processing the document to be printed includes steps S11-S15 and step S17.
Step S11, obtaining a file to be printed.
Step S12, identifying the image object in the file to be printed.
Step S13, judging whether the image object has preset attributes. In the step 13, if the determination result is yes, executing a step S14; if not, step S17 is executed.
Step S14, if the image object has the preset attribute, performing optimization processing on at least the image object portion of the file to be printed to obtain a processed print file.
Step S15, converting the processed print file into a first print file.
And S17, if the image object does not have the preset attribute, converting the file to be printed into a second print file.
In addition, it can be understood that the method for processing a file to be printed in the embodiment shown in fig. 5 may be built in a print driver of an electronic device, as in the embodiment shown in fig. 1, and the method for controlling printing a file may be executed by the print driver of the electronic device and includes most or all of the steps in the embodiment shown in fig. 5, so that the foregoing is described in detail with respect to the embodiment shown in fig. 1, and will not be repeated herein.
Further, the method for processing a file to be printed in the embodiment shown in fig. 5 may also be executed by a file processing device to be printed (such as an application program for processing a file to be printed) of an electronic device, for example, the file processing device to be printed may receive a file to be printed or an initial file generated by an application program (such as a WPS application program), generate and output a first print file in step S15 or a second print file in step S17 to another application program (such as a scan driver), and send the first print file or the second print file to the printing device by another application program (such as a scan driver) to control the printing device to perform printing.
Still further, the method for processing a file to be printed in the embodiment shown in fig. 5 may also be executed in an electronic device, where the method is executed by a file processing apparatus to be printed (such as an application program for processing a file to be printed) of the electronic device, and the electronic device may also communicate with electronic devices of other clients, such as receive a file to be printed or an initial file sent by the electronic device of the other clients, and generate and output the first print file in step S15 or the second print file in step S17 to the electronic device of the other clients, where the electronic device of the other clients sends the first print file or the second print file to the print device to control the print device to perform printing.
Referring to fig. 6, fig. 6 is a block diagram of a document printing control apparatus 50 according to an embodiment of the present invention. The file printing control apparatus 50 may be used to perform the file printing control method of the above-described embodiment, and may include an initial file to perform the file printing control method of the above-described embodiment. Specifically, the document printing control device 50 may include an acquisition module 51, an identification module 52, a judgment module 53, a document processing module 54, a conversion module 55, and a transmission module 56.
The obtaining module 51 is configured to obtain a file to be printed. The identification module 52 is configured to identify an image object in the file to be printed. The judging module 53 is configured to judge whether the image object has a preset attribute. The file processing module 54 is configured to perform optimization processing on at least the image object portion of the file to be printed to obtain a processed print file when the image object has the preset attribute.
The conversion module 55 is configured to convert the processed print file into a first print file, where the first print file is configured to be sent to a printing device to control the printing device to print; the conversion module 55 is further configured to convert the file to be printed into a second print file when the image object does not have the preset attribute, where the second print file is used to be sent to the printing device to control the printing device to print.
The sending module 56 is further configured to send the first print file to a printing device to control the printing device to print; the sending module 56 is further configured to send the second print file to the printing apparatus to control the printing apparatus to print.
As can be seen from the foregoing, in practice, the obtaining module 51 is configured to perform the above step S11, the identifying module 52 is configured to perform the above step S12, the identifying module 53 is configured to perform the above step S13, the judging module 53 is configured to perform the above step S13, the file processing module 54 is configured to perform the above step S14, the converting module 55 is configured to perform the steps S15 and S17, and the transmitting module 56 is configured to perform the steps S16 and S18. The details of steps S11 to S18 are described in detail in the embodiments of the file printing control method, and will not be described here.
Further, it may be appreciated that, in an embodiment, the obtaining module 51 may include an obtaining unit and a converting unit, where the obtaining unit is configured to obtain an initial file, and the converting unit is configured to convert the initial file into a file to be printed in a preset format. The file processing module 54 may perform the optimization process on the file to be printed to obtain the processed print file in the raster graphics format, and specifically, the file processing module 54 includes or calls a file format conversion module GhostScript that performs the optimization process.
Referring to fig. 7, fig. 7 is a block diagram of a document processing apparatus 60 to be printed according to an embodiment of the present invention. The document processing device 60 to be printed may be used to perform the document processing method to be printed of the above-described embodiment (as shown in fig. 4), and may include an initial document to perform the document processing method to be printed of the above-described embodiment. Specifically, the document processing device 60 to be printed may include an acquisition module 51, an identification module 52, a judgment module 53, and a document processing module 54.
The obtaining module 51 is configured to obtain a file to be printed. The identification module 52 is configured to identify an image object in the file to be printed. The judging module 53 is configured to judge whether the image object has a preset attribute. The file processing module 54 is configured to perform optimization processing on at least the image object portion of the file to be printed to obtain a processed print file when the image object has the preset attribute.
As can be seen from the foregoing, in practice, the obtaining module 51 is configured to perform the above step S11, the identifying module 52 is configured to perform the above step S12, the identifying module 53 is configured to perform the above step S13, the judging module 53 is configured to perform the above step S13, and the file processing module 54 is configured to perform the above step S14. The details of steps S11 to S14 are described in detail in the embodiments of the file printing control method, and will not be described here.
Further, it may be appreciated that, in an embodiment, the obtaining module 51 may include an obtaining unit and a converting unit, where the obtaining unit is configured to obtain an initial file, and the converting unit is configured to convert the initial file into a file to be printed in a preset format. The file processing module 54 may perform the optimization process on the file to be printed to obtain the processed print file, and specifically, the file processing module 54 includes a file format conversion module GhostScript that performs the optimization process or calls a file format conversion module GhostScript to perform the optimization process.
Referring to fig. 8, fig. 8 is a block diagram of a document processing apparatus 70 to be printed according to an embodiment of the present invention. The document processing device 70 to be printed may be used to perform the document processing method to be printed of the above-described embodiment (as shown in fig. 5), and may include an initial document to perform the document processing method to be printed of the above-described embodiment. Specifically, the document processing device 70 to be printed may include an acquisition module 51, an identification module 52, a judgment module 53, a document processing module 54, and a conversion module 55.
The obtaining module 51 is configured to obtain a file to be printed. The identification module 52 is configured to identify an image object in the file to be printed. The judging module 53 is configured to judge whether the image object has a preset attribute. The file processing module 54 is configured to perform optimization processing on at least the image object portion of the file to be printed to obtain a processed print file when the image object has the preset attribute.
The conversion module 55 is configured to convert the processed print file into a first print file, where the first print file is configured to be sent to a printing device to control the printing device to print; the conversion module 55 is further configured to convert the file to be printed into a second print file when the image object does not have the preset attribute, where the second print file is used to be sent to the printing device to control the printing device to print.
As can be seen from the foregoing, in practice, the obtaining module 51 is configured to perform the step S11, the identifying module 52 is configured to perform the step S12, the identifying module 53 is configured to perform the step S13, the judging module 53 is configured to perform the step S13, the file processing module 54 is configured to perform the step S14, and the converting module 55 is configured to perform the steps S15 and S17. The details of steps S11 to S15 and S17 are described in detail in the embodiments of the document printing control method, and will not be described here.
Further, it may be appreciated that, in an embodiment, the obtaining module 51 may include an obtaining unit and a converting unit, where the obtaining unit is configured to obtain an initial file, and the converting unit is configured to convert the initial file into a file to be printed in a preset format. The file processing module 54 may perform the optimization process on the file to be printed to obtain the processed print file, and specifically, the file processing module 54 includes a file format conversion module GhostScript that performs the optimization process or calls a file format conversion module GhostScript to perform the optimization process.
According to the file printing control method and device, the file processing method and device to be printed, whether the image object in the file to be printed has the preset attribute is judged by identifying, and when the image object has the preset attribute, at least the image object part of the file to be printed is subjected to optimization processing, so that printing data with high complexity and poor image effect are avoided, the generated printing data is low in complexity and good in image effect, the printing speed can be improved, the problem that the preset attribute affects the image quality of the printed file can be improved, and the printed file image is smoother and purer.
In addition, through experimental comparison, as shown in fig. 9, if the image object of the file to be printed has a preset mask attribute, if the file to be printed is directly converted into a printer file and sent to a printing device for printing, due to the influence of the mask, each pixel of the mask and each pixel of the main image after the mask need to be respectively converted to obtain the printer file, the time from the generation of the file to be printed by an application program (such as WPS) to the completion of printing the file by the printing device is 68 seconds, especially the size of the printer file directly converted by the file to be printed is 48.1MB, which results in slower printing speed; however, for the same file to be printed having the mask preset attribute, if the image object has been subjected to the optimization processing by the file print control apparatus of the above embodiment, the optimized image object is converted into a printer file, that is, the file to be printed is converted into the first print file by the file print control method, and the first print file is sent to the printing device for printing, the time from the start of generating the file to be printed by an application program (such as WPS) to the completion of printing the file by the printing device is 13 seconds, particularly the size of the printer file directly converted from the file to be printed is 6.7MB, so that the printing speed is increased by 523%.
Referring to fig. 10, fig. 10 is a block diagram of an electronic device 90 according to an embodiment of the invention. The electronic device 90 may include a processor 91, a memory 92, and a computer program; wherein the method comprises the steps of
A memory 92 for storing the computer program, which may also be a flash memory (flash). Such as application programs, functional modules, etc. that implement the various method embodiments described above (e.g., as shown in fig. 1-5).
A processor 91 for executing the computer program stored in the memory to implement the steps of the method embodiments (as shown in fig. 1-5) described above. Reference may be made in particular to the description of the embodiments of the method described above.
Alternatively, the memory 92 may be separate or integrated with the processor 91.
When the memory 92 is a device separate from the processor 91, the electronic device 90 may further include:
a bus 93 for connecting the memory 92 and the processor 91.
The present invention also provides a readable storage medium having stored therein a computer program for implementing the methods of the various method embodiments described above (as shown in fig. 1-4) when executed by a processor.
The readable storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media can be any available media that can be accessed by a general purpose or special purpose computer. For example, a readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). In addition, the ASIC may reside in a user device. The processor and the readable storage medium may reside as discrete components in a communication device.
The present invention also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the apparatus may read the execution instructions from the readable storage medium, the execution instructions being executed by the at least one processor to cause the apparatus to perform the methods of the various method embodiments described above (as shown in fig. 1-5).
In the above embodiment of the electronic device, it should be understood that the processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (12)
1. A method for processing a file to be printed is characterized in that: the method comprises the following steps:
acquiring a file to be printed;
identifying an image object in the file to be printed;
judging whether the image object has preset attributes or not; and
If the image object has the preset attribute, optimizing at least the image object part of the file to be printed to obtain a processed printed file;
the preset attributes comprise masks; the optimization process includes at least one of removing transparency, reducing compression;
the judging whether the image object has the preset attribute comprises the following steps:
judging by inquiring the mask type in the picture details of the image object, if the mask type in the picture details is an external mask, judging that the image object has the preset attribute of the mask.
2. The method of claim 1, wherein: the obtaining the file to be printed comprises the following steps: and acquiring an initial file, and converting the initial file into the file to be printed in a preset format.
3. The method of claim 1, wherein: the transparency removal is realized by at least one mode of calling a file format conversion module GHostScript, using a PDF processing module and performing screenshot processing on at least the image object part to obtain a screenshot image and covering the screenshot image on at least the image object part.
4. A file printing control method is characterized in that: the document print control method includes the steps of the document processing method to be printed according to any one of claims 1 to 3, the step of converting the processed print document into a first print document; and a step of transmitting the first print file to a printing apparatus to control the printing apparatus to print; and if the image object does not have the preset attribute, converting the file to be printed into a second print file, and sending the second print file to the printing equipment to control the printing equipment to print.
5. The method of claim 4, wherein: the format of the file to be printed comprises a PDF format; the format of the processed print file comprises a PostScript format with an extension name of PS; the first print file and the second print file have the same format and can be identified and directly printed by the printing device.
6. A document processing apparatus to be printed, characterized in that: the device comprises:
the acquisition module is used for acquiring the file to be printed;
the identification module is used for identifying the image object in the file to be printed;
The judging module is used for judging whether the image object has preset attributes or not; and
The file processing module is used for carrying out optimization processing on at least the image object part of the file to be printed when the image object has the preset attribute so as to obtain a processed printed file;
the preset attributes comprise masks; the optimization process includes at least one of removing transparency, reducing compression;
the judging module is specifically configured to judge by querying to obtain a mask type in the picture details of the image object, if the mask type in the picture details is an external mask, then judging that the image object has a preset attribute of the mask.
7. The apparatus of claim 6, wherein: the acquisition module comprises an acquisition unit and a conversion unit, wherein the acquisition unit is used for acquiring an initial file, and the conversion unit is used for converting the initial file into a file to be printed in a preset format.
8. The apparatus of claim 6, wherein: the file processing module is implemented by at least one of calling a file format conversion module GhostScript to remove transparency for at least the image object portion, using a PDF processing module to remove transparency for at least the image object portion, and performing screenshot processing on at least the image object portion to obtain a screenshot image and overlaying the screenshot image on at least the image object portion to remove transparency for at least the image object portion.
9. A document printing control apparatus characterized in that: the file printing control device comprises the file processing device to be printed, a conversion module and a sending module, wherein the conversion module is used for converting the processed printing file into a first printing file, the sending module is further used for sending the first printing file to a printing device to control the printing device to print, the conversion module is further used for converting the file to be printed into a second printing file when the image object does not have the preset attribute, and the sending module is further used for sending the second printing file to the printing device to control the printing device to print.
10. The apparatus as claimed in claim 9, wherein: the format of the file to be printed comprises a PDF format; the format of the processed print file comprises a PostScript format with an extension name of PS; the first print file and the second print file have the same format and can be identified and directly printed by the printing device.
11. A readable storage medium, characterized in that the readable storage medium has stored therein a computer program for implementing the method of any one of claims 1 to 4 when being executed by a processor.
12. An electronic device, comprising: a memory, a processor storing a computer program, the processor executing the method of any of claims 1 to 4 when the computer program in the memory is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010472869.1A CN111596873B (en) | 2020-05-29 | 2020-05-29 | File processing method and device to be printed, file printing control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010472869.1A CN111596873B (en) | 2020-05-29 | 2020-05-29 | File processing method and device to be printed, file printing control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111596873A CN111596873A (en) | 2020-08-28 |
CN111596873B true CN111596873B (en) | 2024-02-23 |
Family
ID=72191559
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010472869.1A Active CN111596873B (en) | 2020-05-29 | 2020-05-29 | File processing method and device to be printed, file printing control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111596873B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112162711B (en) * | 2020-09-01 | 2021-11-16 | 珠海格力电器股份有限公司 | Image file conversion method and device, electronic equipment and computer readable medium |
CN112732206A (en) * | 2021-01-07 | 2021-04-30 | 珠海奔图电子有限公司 | Print control method, print driving apparatus, and computer-readable storage medium |
CN114721613B (en) * | 2022-06-08 | 2022-08-16 | 和众印网南京信息科技有限公司 | Remote control method and system for printing machine |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB1186639A (en) * | 1967-06-28 | 1970-04-02 | Printing Dev Int | Knock-Out Masking Techniques |
JP2009230340A (en) * | 2008-03-21 | 2009-10-08 | Fuji Xerox Co Ltd | Printing control device, program and system |
JP2017107269A (en) * | 2015-12-07 | 2017-06-15 | 株式会社リコー | Information processing device, information distribution system, information distribution method and program |
CN109101203A (en) * | 2018-07-16 | 2018-12-28 | 森大(深圳)技术有限公司 | For the image processing method of type drum, device, equipment and storage medium |
CN109597592A (en) * | 2018-12-03 | 2019-04-09 | 珠海趣印科技有限公司 | A kind of App text intelligence Enhancement Method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3956583B2 (en) * | 2000-06-05 | 2007-08-08 | 富士ゼロックス株式会社 | Recording medium output device and recording medium output system |
-
2020
- 2020-05-29 CN CN202010472869.1A patent/CN111596873B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB1186639A (en) * | 1967-06-28 | 1970-04-02 | Printing Dev Int | Knock-Out Masking Techniques |
JP2009230340A (en) * | 2008-03-21 | 2009-10-08 | Fuji Xerox Co Ltd | Printing control device, program and system |
JP2017107269A (en) * | 2015-12-07 | 2017-06-15 | 株式会社リコー | Information processing device, information distribution system, information distribution method and program |
CN109101203A (en) * | 2018-07-16 | 2018-12-28 | 森大(深圳)技术有限公司 | For the image processing method of type drum, device, equipment and storage medium |
CN109597592A (en) * | 2018-12-03 | 2019-04-09 | 珠海趣印科技有限公司 | A kind of App text intelligence Enhancement Method |
Also Published As
Publication number | Publication date |
---|---|
CN111596873A (en) | 2020-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111596873B (en) | File processing method and device to be printed, file printing control method and device | |
US7463382B2 (en) | Print system and printer device facilitating reuse of print data | |
US9286553B2 (en) | Image forming method, non-transitory computer readable storage medium stored with program for image forming system, and image forming system | |
US10291794B2 (en) | Implementation of distributed processing using device, information processing apparatus, information processing system, and information processing method to reduce network lag | |
US20040083430A1 (en) | Method and apparatus to process portable document format data containing transparency | |
CN112732206A (en) | Print control method, print driving apparatus, and computer-readable storage medium | |
US8570581B2 (en) | Image forming method and system using XHTML-print data | |
US20050045711A1 (en) | Image processing apparatus | |
JP4577907B2 (en) | Image processing apparatus, image forming apparatus, and printing system | |
US20060072152A1 (en) | Printing system for dedicatedly storing a printing image | |
US11494135B2 (en) | Information processing apparatus, control method for information processing apparatus, and storage medium | |
CN113064560B (en) | Printing control method, printing drive device, image forming apparatus, and storage medium | |
CN114356256A (en) | Image processing method, equipment terminal and storage medium | |
JPH11203101A (en) | Computer interface device and method for producing output data for stencil printer | |
JP2000284926A (en) | Print processing system and its method | |
RU2820425C1 (en) | Printing control method, printer driver device and computer-readable data medium | |
JP2006235935A (en) | Printing system | |
US10275194B2 (en) | Electronic device for file conversion | |
JP2006218819A (en) | Image formation apparatus, image processing apparatus, program, and image processing method | |
US20140233051A1 (en) | Document distribution server and program for document distribution server | |
JP2002032285A (en) | Image transmitter, image receiver, image processing system, image storage medium, image transmission method, image reception method and image processing method | |
CN115878055A (en) | Tracing file generation method and device, storage medium and computer equipment | |
JP3733547B2 (en) | Document print processing system | |
JP2003122541A (en) | Page description data conversion apparatus and page description data conversion program | |
US20070296996A1 (en) | Printing apparatus |
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 |