CN113791745B - Printing method, system and medium for multi-type files - Google Patents

Printing method, system and medium for multi-type files Download PDF

Info

Publication number
CN113791745B
CN113791745B CN202110914024.8A CN202110914024A CN113791745B CN 113791745 B CN113791745 B CN 113791745B CN 202110914024 A CN202110914024 A CN 202110914024A CN 113791745 B CN113791745 B CN 113791745B
Authority
CN
China
Prior art keywords
printing
file
program
information
printed
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
Application number
CN202110914024.8A
Other languages
Chinese (zh)
Other versions
CN113791745A (en
Inventor
胡焱
王思栋
牛鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Financial Information Technology Co Ltd
Original Assignee
Inspur Financial Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Financial Information Technology Co Ltd filed Critical Inspur Financial Information Technology Co Ltd
Priority to CN202110914024.8A priority Critical patent/CN113791745B/en
Publication of CN113791745A publication Critical patent/CN113791745A/en
Application granted granted Critical
Publication of CN113791745B publication Critical patent/CN113791745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1205Improving or facilitating administration, e.g. print management resulting in increased flexibility in print job configuration, e.g. job settings, print requirements, job tickets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/128Direct printing, e.g. sending document file, using memory stick, printing from a camera

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 application discloses a printing method, a printing system and a printing medium for multiple types of files, wherein the method comprises the following steps: configuring a statistical analysis program and a frame conversion program; detecting printing requirement information and printing configuration information; setting a main printing program based on the frame conversion program and the printing configuration information; setting a type threshold value, and acquiring a file to be printed; analyzing file information of a file to be printed; setting a print mode based on the statistical analysis program, the type threshold, and the file information; when the printing mode is a single printing mode, performing a printing matching operation on the file to be printed based on the page number threshold value, the printing requirement information and the main printing program; when the printing mode is a multi-printing mode, executing a printing scheme configuration operation based on the printing requirement information and the main printing program to obtain a pre-printing scheme; printing the file to be printed based on a pre-printing scheme; the application can be applied to various types of originals to be printed, flexibly regulates and controls a high-efficiency printing scheme, and has extremely strong flexible adaptability.

Description

Printing method, system and medium for multi-type files
Technical Field
The present application relates to the field of file printing technologies, and in particular, to a method, a system, and a medium for printing multiple types of files.
Background
The printing method adopted in the prior art is more conventional, is mainly applied to PDF files, and when an original file needing to be printed is not a PDF file, the printing method has the problems of large probability of proportion distortion, disordered format, single size and low printing efficiency, so that the user experience is greatly affected, and the printing method cannot be applied to printing equipment in various scenes.
Disclosure of Invention
The application mainly solves the problem that the existing printing method is poor in flexible adaptability and diversity.
In order to solve the technical problems, the application adopts a technical scheme that: there is provided a printing method of a multi-type document, including the steps of:
initializing:
setting a page number threshold;
configuring a statistical analysis program and a frame conversion program;
detecting printing requirement information and printing configuration information;
setting a main printing program based on the frame conversion program and the printing configuration information;
setting a printing mode:
setting a type threshold value, and acquiring a file to be printed;
analyzing file information of the file to be printed;
setting a print mode based on the statistical analysis program, the type threshold, and the file information;
and (3) printing:
when the printing mode is a single printing mode, performing a printing matching operation on the file to be printed based on the page number threshold, the printing requirement information and the main printing program;
when the printing mode is a multi-printing mode, executing a printing scheme configuration operation based on the printing requirement information and the main printing program to obtain a pre-printing scheme; and printing the file to be printed based on the pre-printing scheme.
As an improvement, the step of setting a print mode based on the statistical analysis program, the type threshold, and the file information further includes:
identifying file types in the file information, calling the statistical analysis program to count the type quantity of the file types, and comparing whether the type quantity is matched with the type threshold value;
if the printing modes are matched, setting the printing modes as the single printing modes; if not, setting the printing mode as the multi-printing mode.
As an improvement, the step of setting a main printing program based on the frame conversion program and the printing configuration information further includes:
identifying whether program frame information matched with the frame printing program exists in the printing configuration information;
if yes, setting the frame printing program as the main printing program;
if not, acquiring host printing program information in the printing configuration information, and identifying whether bit information of a host printing program in the host printing program information is empty; and if the host printing program is not empty, setting the host printing program matched with the host printing program information as the host printing program.
As an improvement, the frame conversion program includes: a web page conversion program and a picture conversion program;
the host printing program includes: text parsing program, picture grabbing program, PDF parsing program and picture and text processing program.
As an improved solution, the print matching operation includes:
calling the main printing program matched with the file type to convert the file to be printed into a first PDF file; and judging whether the image-text specification information of the first PDF file is matched with the output specification information in the printing requirement information, and if so, printing the first PDF file.
As an improvement, the print matching operation further includes:
when the file type is a PDF file, identifying output page number information in the printing requirement information; comparing whether the output page number information is matched with the page number threshold value;
if so, calling the picture grabbing program to carry out image capturing processing on the file to be printed to obtain a grabbing file; invoking the picture analysis program or the picture conversion program to analyze the image of the capture file to obtain an identification image; invoking the image-text processing program to convert the identification image into a second PDF file matched with the output specification information, and printing the second PDF file;
and if the output specification information is not matched with the output specification information, calling the PDF analysis program to convert the file to be printed into a third PDF file matched with the output specification information, and printing the third PDF file.
As an improved aspect, the printing scheme configuration operation includes:
detecting the type superposition condition of the file to be printed;
setting a first printing scheme based on the output specification information and the main printing program when the type superposition condition is a first condition; the first case includes: the file to be printed simultaneously comprises a text file, a picture file and a PDF file:
setting a second printing scheme based on the output specification information and the main printing program when the type superposition condition is a second condition; the second case includes: the text files and the webpage files exist in the file to be printed at the same time, and the main conversion program is the frame conversion program;
when the type superposition condition is a third condition, executing the printing matching operation; the third condition is that a text type file, a picture type file and a PDF type file are non-simultaneous, and a text type file and a webpage type file are non-simultaneous;
the first printing scheme and the second printing scheme are both the pre-printing schemes.
As an improvement, the first printing scheme includes:
calling the text parsing program to parse the text file to obtain text data, and drawing a first picture to be converted according to the text data;
calling the picture analysis program to analyze the picture type file to obtain a second picture to be converted;
calling the picture grabbing program and the picture analyzing program to analyze the PDF file to obtain a third picture to be converted;
invoking the image-text processing program to respectively convert the first to-be-converted picture, the second to-be-converted picture and the third to-be-converted picture into a first to-be-printed PDF file, a second to-be-printed PDF file and a third to-be-printed PDF file which correspond to the output specification information; printing the first PDF file to be printed, the second PDF file to be printed and the third PDF file to be printed;
the second printing scheme includes:
calling the webpage conversion program to respectively convert the text file and the webpage file into a fourth PDF file to be printed and a fifth PDF file to be printed, wherein the fourth PDF file to be printed and the fifth PDF file to be printed are matched with the output specification information; and printing the fourth PDF file to be printed and the fifth PDF file to be printed.
The application also provides a printing system of the multi-type file, comprising: the system comprises an initialization module, a mode setting module, an operation execution module and a scheme configuration module;
the initialization module is used for setting a page number threshold value and configuring a statistical analysis program and a frame conversion program; the initialization module is also used for detecting printing requirement information and printing configuration information; the initialization module is also used for setting a main printing program according to the frame conversion program and the printing configuration information;
the mode setting module is used for setting a type threshold value and acquiring a file to be printed; the mode setting module is also used for analyzing file information of the file to be printed and setting a printing mode based on the statistical analysis program, the type threshold and the file information;
the operation execution module is used for executing a printing matching operation on the file to be printed based on the page number threshold value, the printing requirement information and the main printing program when the printing mode is a single printing mode;
the scheme configuration module is used for executing a printing scheme configuration operation based on the printing requirement information and the main printing program when the printing mode is a multi-printing mode, so as to obtain a pre-printing scheme; the scheme configuration module is also used for printing the file to be printed according to the pre-printing scheme.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of printing multiple types of files.
The beneficial effects of the application are as follows:
1. the printing method of the multi-type file can realize the rapid embedding of the applied equipment, has simple architecture and low configuration difficulty, can be applied to various original papers to be printed, flexibly regulates and controls the printing scheme with the highest efficiency, has extremely strong flexibility and adaptability, and has extremely high universality and can be applied to various scenes.
2. The printing system of the multi-type file can realize compatible matching of various types of to-be-printed original papers through the mutual matching of the initialization module, the mode setting module, the operation execution module and the scheme configuration module, flexibly regulate and control the printing scheme with the highest efficiency, and has extremely strong flexible adaptability and extremely high universality, and can be applied to various scenes.
3. The computer readable storage medium can realize the coordination of the guide initialization module, the mode setting module, the operation execution module and the scheme configuration module, further realize the compatible matching of various types of to-be-printed original paper, flexibly regulate and control the printing scheme with the highest efficiency, and effectively improve the operability of the printing method of the multi-type file.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for printing a multi-type document according to embodiment 1 of the present application;
FIG. 2 is a schematic diagram showing a specific flow of step S100 in embodiment 1 of the present application;
FIG. 3 is a schematic flow chart of step S200 in embodiment 1 of the present application;
FIG. 4 is a schematic flow chart of step S300 in embodiment 1 of the present application;
fig. 5 is a block diagram of a printing system for multi-type documents according to embodiment 2 of the present application.
Detailed Description
The preferred embodiments of the present application will be described in detail below with reference to the accompanying drawings so that the advantages and features of the present application can be more easily understood by those skilled in the art, thereby making clear and defining the scope of the present application.
In the description of the present application, it should be noted that the described embodiments of the present application are some, but not all embodiments of the present application; all other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should be noted that the terms "first," second, "" third, "" fourth, "and fifth" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present application, unless explicitly specified and defined otherwise, the terms "page number threshold", "statistical analysis program", "frame conversion program", "print demand information", "print configuration information", "main print program", "type threshold", "document to be printed", "document information", "print mode", "print matching operation", "print scheme configuration operation", "pre-print scheme", "single print mode", "multiple print mode", "program frame information", "in-place information", "host print program", "web page conversion program", "picture conversion program", "text analysis program", "picture capture program", "PDF analysis program", "picture processing program", "PDF-like document", "output page number information", "image capturing process", "capture image file", "capture image", "type superimposition case", "print scheme", "output specification information", "initialization module", "mode setting module", "operation execution module", "scheme configuration module" are to be interpreted in a broad sense. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art.
In describing the present application, it should be noted that: the embodiment is mainly applied to the credit self-service terminal under the Linux system, and comprises but is not limited to the Linux system.
In describing the present application, it should be noted that: linux is an operating system; JMP is a statistical analysis program; PDF is a portable document format; QT is an application development framework; HTML is a hypertext markup language; image is a picture format.
Example 1
The present embodiment provides a printing method of a multi-type file, as shown in fig. 1 to 4, including the following steps:
s100, initializing:
the step S100 specifically includes:
s110, setting a page number threshold; in this embodiment, the threshold of page number is 1, and the threshold of page number is used to determine that the print requirement corresponding to the PDF file is single page output or multi-page output;
s120, configuring a statistical analysis program and a frame conversion program; correspondingly, in this embodiment, the statistical analysis program may employ a statistical function similar to JMP analysis software principle; the frame conversion program is a QT frame-based conversion program;
s130, detecting printing requirement information and printing configuration information; in this embodiment, the print requirement information is the size, margin, direction, scaling, etc. of the file that the client needs to print; the printing configuration information is software program or hardware data carried by or preconfigured by printing equipment in the applied terminal;
s140, setting a main printing program based on the frame conversion program and the printing configuration information; correspondingly, because the conversion program based on the QT frame can be used with high efficiency only by the terminal carrying the QT frame, in order to further improve the printing efficiency, a main printing program which needs to be called later is set according to the actual printing configuration information;
specifically, step S140 further includes: identifying whether program frame information matched with the frame printing program exists in the printing configuration information; if yes, setting the main printing program as the frame printing program; if not, acquiring host printing program information in the printing configuration information, and identifying whether bit information of a host printing program in the host printing program information is empty; if the host printing program is not empty, setting a host printing program matched with the host printing program information as the host printing program; in this step, the in-place information is an in-place value between the program and the printing device, and if the in-place value is not null, it means that the program can be started in standby; if the bit value is null, the program is not configured or locked and cannot be started, and reconfiguration or awakening is needed; considering that a printing program in the printing device must be in a bit state, if not in bit, a wake-up operation of a corresponding program is required; when the wake-up operation is executed, the time consumption of reconfiguring the QT framework and the wake-up operation is required to be calculated, and the steps with less time consumption are selected to be executed;
specifically, the framework conversion program includes: a web page conversion program and a picture conversion program; the host printing program includes: text parsing program, picture parsing program, HTML conversion program, picture grabbing program, PDF parsing program and picture-text processing program; in this embodiment, the web page conversion program is qebengine; the picture conversion program is a QT picture analysis program; the picture analysis program is an openCV picture analysis program; the HTML conversion program is a wkhtmltopdf tool; the PDF analysis program is a C++ class library Poppler analysis program or a MuPDF open source library analysis program; the image-text processing program is an imageMagick image conversion program; correspondingly, in the present embodiment, the specific program is only one implementation, and it may be replaced by a program, a function or a script that can produce the same technical effect under other frameworks.
S200, setting a printing mode:
the step S200 specifically includes:
s210, setting a type threshold value, and acquiring a file to be printed; correspondingly, in the present embodiment, the type threshold is set to 1, that is, more than 1 file of type is set to another mode for printing;
s220, analyzing file information of the file to be printed; correspondingly, in this embodiment, the number of files to be printed is one or more; the file information comprises the number, the type and the like of the files to be printed;
s230, setting a printing mode based on the statistical analysis program, the type threshold and the file information; specifically, step S230 further includes: identifying file types in the file information, calling the statistical analysis program to count the type quantity of the file types, and comparing whether the type quantity is matched with the type threshold value; if the printing modes are matched, setting the printing modes as the single printing modes; if not, setting the printing mode as the multi-printing mode; in this embodiment, if the number of types is greater than the type threshold, the number of types is not matched with the type threshold; the number of the types is not greater than the type threshold value, and the number of the types is matched with the type threshold value; correspondingly, in the step, through setting of the printing mode, the most appropriate and most efficient printing mode is designed for the corresponding file to be printed, and the flexible adaptability of the printing method is further improved.
S300, printing:
the step S300 specifically includes:
s310, when the printing mode is a single printing mode, performing a printing matching operation on the file to be printed based on the page number threshold value, the printing requirement information and the main printing program;
specifically, the print matching operation includes: calling the main printing program matched with the file type to convert the file to be printed into a first PDF file; judging whether the image-text specification information of the first PDF file is matched with the output specification information in the printing requirement information, and if so, printing the first PDF file; in this embodiment, the method is executed according to a print matching operation, and a specific main print program is combined to convert a file to be printed into a file matched with output specification information; correspondingly, the output specification information is the size, margin, direction, zoom requirement and the like of the file which are required to be printed by a customer; correspondingly, if the first PDF file is not matched with the output specification information in the printing requirement information, the first PDF file needs to be modified by adopting a format modification program attached to the printing equipment so as to meet the requirement of a customer.
Correspondingly, considering that when the file to be printed is directly a PDF file, in order to output a PDF file with higher quality and enable the PDF file to meet the output requirement, the output page number information in the printing requirement information is identified; comparing whether the output page number information is matched with the page number threshold value; if so, invoking the picture grabbing program to carry out image capturing processing on the file to be printed to obtain a grabbing file, wherein in the step, the picture grabbing program only aims at the output and adjustment of the PDF file of a single page, so that the steps are carried out according to the threshold value of the page number; invoking the picture analysis program or the picture conversion program to analyze the images of the capture files to obtain identification images, wherein the identification images are Image objects; invoking the image-text processing program to convert the identification image into a second PDF file matched with the output specification information, and printing the second PDF file; if not, the PDF analysis program is called to convert the file to be printed into a third PDF file matched with the output specification information, and the third PDF file is printed; in this embodiment, the output page number information is matched with the page number threshold value, and the output page number information is not matched with the page number threshold value if the output page number information is different from the page number threshold value; correspondingly, through the step, various types of files can be printed with high efficiency in a single printing mode, and the problem that PDF files are not matched with output specification information is avoided aiming at PDF files, so that the requirements of users are met, and the experience of the users is improved.
S320, when the printing mode is a multi-printing mode, executing a printing scheme configuration operation based on the printing requirement information and the main printing program to obtain a pre-printing scheme; printing the file to be printed based on the pre-printing scheme;
specifically, the print scheme configuration operation includes: detecting the type superposition condition of the file to be printed; in this embodiment, when a plurality of types of files exist at the same time, some files are compatible with one program at the same time, so designing a printing scheme according to this idea will make printing efficiency more efficient, and the following steps are designed:
setting a first printing scheme based on the output specification information and the main printing program when the type superposition condition is a first condition; the first case includes: the file to be printed simultaneously comprises a text file, a picture file and a PDF file: correspondingly, the type superposition condition is the combination condition of file types in the file to be printed; when the text files, the picture files and the PDF files exist in the files to be printed at the same time, the host printing program can be applied to operate at the same time, a QT frame does not need to be started, and the method is more convenient and faster; however, when any two files of a text file, a picture file and a PDF file exist in the file to be printed at the same time, a conversion program or a host printing program of a QT frame can be adopted according to actual conditions, and the efficiency difference is not large, so that the range of influence on the efficiency is low, and the effect is not calculated in the condition;
correspondingly, the first printing scheme includes:
calling the text parsing program to parse the text file to obtain text data, and drawing a first picture to be converted according to the text data; calling the picture analysis program to analyze the picture type file to obtain a second picture to be converted; calling the picture grabbing program and the picture analyzing program to analyze the PDF file to obtain a third picture to be converted; invoking the image-text processing program to respectively convert the first to-be-converted picture, the second to-be-converted picture and the third to-be-converted picture into a first to-be-printed PDF file, a second to-be-printed PDF file and a third to-be-printed PDF file which correspond to the output specification information; printing the first PDF file to be printed, the second PDF file to be printed and the third PDF file to be printed; correspondingly, in the step, the called programs are host printing programs, and the conversion program of the QT framework is not required to be started, so that the efficiency is extremely high;
setting a second printing scheme based on the output specification information and the main printing program when the type superposition condition is a second condition; the second case includes: the text files and the webpage files exist in the file to be printed at the same time, and the main conversion program is the frame conversion program; the second printing scheme includes: calling the webpage conversion program to respectively convert the text file and the webpage file into a fourth PDF file to be printed and a fifth PDF file to be printed, wherein the fourth PDF file to be printed and the fifth PDF file to be printed are matched with the output specification information; printing the fourth PDF file to be printed and the fifth PDF file to be printed; correspondingly, when the file to be printed is only of two types, namely a webpage file and a text file, the two types of files can be converted respectively only by calling a webpage conversion program under the QT frame, so that the efficiency is extremely high, the operation is simple, and the user experience is improved; correspondingly, the first printing scheme and the second printing scheme are both the pre-printing schemes.
When the type superposition condition is a third condition, executing the printing matching operation; the third case is the type superposition case except the first case and the second case, namely, a non-simultaneous text type file, a picture type file and a PDF type file and a non-simultaneous text type file and a webpage type file;
correspondingly, except the above cases, the printing matching operation is carried out on the files to be printed corresponding to other types of superposition cases, namely, the corresponding programs are selected according to the types to carry out conversion and printing, so that the efficiency is extremely high;
correspondingly, several print matching operations are illustrated herein:
when the file to be printed is a text file, the text file can be analyzed through a text analysis program to obtain text data, a picture to be converted is drawn according to the text data, and the picture to be converted is converted into a target PDF file through a picture-text processing program to be printed; meanwhile, the text file can be directly converted into a target PDF file through a webpage conversion program for printing;
when the file to be printed is a webpage type file, the webpage type file can be directly converted into a target PDF file through a webpage conversion program for printing; or adopting an HTML conversion program to directly convert the webpage class file into a target PDF file for printing;
when the file to be printed is a picture type file, converting the picture type file into an Image object through a picture identification technology or a picture analysis program or a picture conversion program, and converting the Image object into a target PDF file through a picture-text processing program for printing;
when the file to be printed is a PDF file, converting the PDF file into an Image object by adopting the cooperation of a picture grabbing program and a picture analyzing program, and converting the Image object into a target PDF file by using a picture-text processing program for printing; or directly converting the PDF file into a target PDF file through a PDF analysis program for printing; in each of the above cases, the program and the executed operation are selected according to specific print configuration information and print demand information.
The printing method of the multi-type file described in the embodiment 1 can flexibly configure the printing scheme with the highest efficiency for the multi-type file, has extremely high applicability, high automation degree, simple operation and strong universality, and makes up the defects of the prior art.
Example 2
The present embodiment provides a printing system for multi-type files, as shown in fig. 5, including: the system comprises an initialization module, a mode setting module, an operation execution module and a scheme configuration module;
in the printing system of the multi-type file, an initialization module is used for setting a page number threshold value and configuring a statistical analysis program and a frame conversion program; the initialization module is also used for detecting printing requirement information and printing configuration information; the initialization module is also used for setting a main printing program according to the frame conversion program and the printing configuration information;
specifically, the initialization module identifies whether program frame information matched with the frame printing program exists in the printing configuration information; if yes, the initialization module sets the main printing program as the frame printing program; if not, the initialization module acquires the host printing program information in the printing configuration information, and the initialization module identifies whether the bit information of the host printing program in the host printing program information is empty; if the host printer is not empty, the initialization module sets the host printer matched with the host printer information as the host printer.
In the printing system of the multi-type file, the mode setting module is used for setting a type threshold value and acquiring the file to be printed; the mode setting module is also used for analyzing file information of the file to be printed and setting a printing mode based on the statistical analysis program, the type threshold and the file information;
specifically, the mode setting module identifies the file type in the file information, invokes the statistical analysis program to count the type number of the file type, and compares whether the type number is matched with the type threshold; if so, the mode setting module sets the printing mode as the single printing mode; if not, the mode setting module sets the printing mode as the multiple printing mode.
In the printing system of the multi-type file, the operation execution module is used for executing a printing matching operation on the file to be printed based on the page number threshold value, the printing requirement information and the main printing program when the printing mode is a single printing mode;
specifically, the print matching operation includes: the operation execution module calls the main printing program matched with the file type to convert the file to be printed into a first PDF file; and the operation execution module judges whether the image-text specification information of the first PDF file is matched with the output specification information in the printing requirement information, and if so, the operation execution module prints the first PDF file.
Specifically, the print matching operation further includes: when the file type is a PDF file, the operation execution module identifies output page number information in the printing demand information and compares whether the output page number information is matched with the page number threshold value or not; if so, the operation execution module calls the picture grabbing program to carry out image capturing processing on the file to be printed to obtain a grabbing file; the operation execution module invokes the picture analysis program or the picture conversion program to analyze the image of the capture file to obtain an identification image; the operation execution module calls the image-text processing program to convert the identification image into a second PDF file matched with the output specification information, and prints the second PDF file; and if the output specification information is not matched with the output specification information, the operation execution module calls the PDF analysis program to convert the file to be printed into a third PDF file matched with the output specification information, and prints the third PDF file.
In the printing system of the multi-type file, the scheme configuration module is used for executing a printing scheme configuration operation based on the printing requirement information and the main printing program when the printing mode is a multi-printing mode to obtain a pre-printing scheme; the scheme configuration module is also used for printing the file to be printed according to the pre-printing scheme;
specifically, the print scheme configuration operation includes: the scheme configuration module detects the type superposition condition of the file to be printed; when the type superposition condition is a first condition, a scheme configuration module sets a first printing scheme based on the output specification information and the main printing program; the first case includes: the file to be printed simultaneously comprises a text file, a picture file and a PDF file: the first printing scheme includes: the scheme configuration module calls the text analysis program to analyze the text file to obtain text data, and draws a first picture to be converted according to the text data; the scheme configuration module invokes the picture analysis program to analyze the picture class file to obtain a second picture to be converted; the scheme configuration module invokes the picture grabbing program and the picture analyzing program to analyze the PDF file to obtain a third picture to be converted; the scheme configuration module calls the image-text processing program to convert the first image to be converted, the second image to be converted and the third image to be converted into a first PDF file to be printed, a second PDF file to be printed and a third PDF file to be printed, which correspond to the output specification information respectively; the scheme configuration module prints the first PDF file to be printed, the second PDF file to be printed and the third PDF file to be printed;
correspondingly, when the type superposition condition is a second condition, the scheme configuration module sets a second printing scheme based on the output specification information and the main printing program; the second case includes: the text files and the webpage files exist in the file to be printed at the same time, and the main conversion program is the frame conversion program; the second printing scheme includes: the scheme configuration module calls the webpage conversion program to convert the text files and the webpage files into a fourth PDF file to be printed and a fifth PDF file to be printed, which are matched with the output specification information respectively; and the scheme configuration module prints the fourth PDF file to be printed and the fifth PDF file to be printed.
Correspondingly, when the type superposition condition is a third condition, the scheme configuration module controls the operation execution module to execute the printing matching operation; the third situation is the type superposition situation except the first situation and the second situation, namely, a non-simultaneous text type file, a picture type file and a PDF type file and a non-simultaneous text type file and a webpage type file; correspondingly, the first printing scheme and the second printing scheme are both the pre-printing schemes.
Through the printing system of the multi-type file described in this embodiment 2, the initialization module, the mode setting module, the operation execution module and the scheme configuration module can be mutually matched, so that the printing scheme with the highest efficiency can be flexibly configured for the multi-type file, and the printing system has extremely high applicability, high automation degree, simple operation and strong universality, and overcomes the defects of the prior art.
Example 3
The present embodiment provides a computer-readable storage medium including:
the storage medium is used for storing computer software instructions for implementing the printing method of the multi-type file described in the above embodiment 1, and includes a program for executing the above-described setting for the printing method of the multi-type file; specifically, the executable program may be built in the printing system of the multi-type file described in embodiment 2, so that the printing system of the multi-type file can implement the printing method of the multi-type file described in embodiment 1 by executing the built-in executable program.
Further, the computer readable storage medium provided in the present embodiment may be any combination of one or more readable storage media, where the readable storage media includes an electric, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
Compared with the prior art, the printing method, the system and the medium for the multi-type file can be used for adapting various types of original papers to be printed through the method, and flexibly regulating and controlling the printing scheme with the highest efficiency; the system provides effective technical support for the method, and the system and the method have extremely strong flexible adaptability and extremely high universality and can be applied to various scenes.
The foregoing embodiment of the present application has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or a program implemented by a program to instruct related hardware may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description is only illustrative of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present application.

Claims (8)

1. A method of printing a multi-type document, comprising the steps of:
initializing:
setting a page number threshold;
configuring a statistical analysis program and a frame conversion program;
detecting printing requirement information and printing configuration information;
setting a main printing program based on the frame conversion program and the printing configuration information;
setting a printing mode:
setting a type threshold value, and acquiring a file to be printed;
analyzing file information of the file to be printed;
setting a print mode based on the statistical analysis program, the type threshold, and the file information;
and (3) printing:
when the printing mode is a single printing mode, performing a printing matching operation on the file to be printed based on the page number threshold, the printing requirement information and the main printing program;
when the printing mode is a multi-printing mode, executing a printing scheme configuration operation based on the printing requirement information and the main printing program to obtain a pre-printing scheme; printing the file to be printed based on the pre-printing scheme;
the step of setting a print mode based on the statistical analysis program, the type threshold, and the file information further includes:
identifying file types in the file information, calling the statistical analysis program to count the type quantity of the file types, and comparing whether the type quantity is matched with the type threshold value;
if the printing modes are matched, setting the printing modes as the single printing modes; if not, setting the printing mode as the multi-printing mode;
the step of setting a main printing program based on the frame conversion program and the printing configuration information further includes:
identifying whether program frame information matched with the frame conversion program exists in the printing configuration information;
if yes, setting the frame conversion program as the main printing program;
if not, acquiring host printing program information in the printing configuration information, and identifying whether bit information of a host printing program in the host printing program information is empty; and if the host printing program is not empty, setting the host printing program matched with the host printing program information as the host printing program.
2. The printing method of a multi-type document according to claim 1, wherein the frame conversion program includes: a web page conversion program and a picture conversion program;
the host printing program includes: text parsing program, picture grabbing program, PDF parsing program and picture and text processing program.
3. The printing method of a multi-type document according to claim 2, wherein the print matching operation includes:
calling the main printing program matched with the file type to convert the file to be printed into a first PDF file; and judging whether the image-text specification information of the first PDF file is matched with the output specification information in the printing requirement information, and if so, printing the first PDF file.
4. A method of printing a multi-type document as recited in claim 3 wherein said print matching operation further comprises:
when the file type is a PDF file, identifying output page number information in the printing requirement information; comparing whether the output page number information is matched with the page number threshold value;
if so, calling the picture grabbing program to carry out image capturing processing on the file to be printed to obtain a grabbing file; invoking the picture analysis program or the picture conversion program to analyze the image of the capture file to obtain an identification image; invoking the image-text processing program to convert the identification image into a second PDF file matched with the output specification information, and printing the second PDF file;
and if the output specification information is not matched with the output specification information, calling the PDF analysis program to convert the file to be printed into a third PDF file matched with the output specification information, and printing the third PDF file.
5. The printing method of a multi-type document according to claim 3 or 4, wherein the printing scheme configuration operation includes:
detecting the type superposition condition of the file to be printed;
setting a first printing scheme based on the output specification information and the main printing program when the type superposition condition is a first condition; the first case includes: the file to be printed simultaneously comprises a text file, a picture file and a PDF file:
setting a second printing scheme based on the output specification information and the main printing program when the type superposition condition is a second condition; the second case includes: the text files and the webpage files exist in the files to be printed at the same time, and the main printing program is the frame conversion program;
when the type superposition condition is a third condition, executing the printing matching operation; the third condition is that a text type file, a picture type file and a PDF type file are non-simultaneous, and a text type file and a webpage type file are non-simultaneous;
the first printing scheme and the second printing scheme are both the pre-printing schemes.
6. The method of printing multiple types of documents as claimed in claim 5, wherein the first printing scheme comprises:
calling the text parsing program to parse the text file to obtain text data, and drawing a first picture to be converted according to the text data;
calling the picture analysis program to analyze the picture type file to obtain a second picture to be converted;
calling the picture grabbing program and the picture analyzing program to analyze the PDF file to obtain a third picture to be converted;
invoking the image-text processing program to respectively convert the first to-be-converted picture, the second to-be-converted picture and the third to-be-converted picture into a first to-be-printed PDF file, a second to-be-printed PDF file and a third to-be-printed PDF file which correspond to the output specification information; printing the first PDF file to be printed, the second PDF file to be printed and the third PDF file to be printed;
the second printing scheme includes:
calling the webpage conversion program to respectively convert the text file and the webpage file into a fourth PDF file to be printed and a fifth PDF file to be printed, wherein the fourth PDF file to be printed and the fifth PDF file to be printed are matched with the output specification information; and printing the fourth PDF file to be printed and the fifth PDF file to be printed.
7. A printing system for multiple types of documents, comprising: the system comprises an initialization module, a mode setting module, an operation execution module and a scheme configuration module;
the initialization module is used for setting a page number threshold value and configuring a statistical analysis program and a frame conversion program; the initialization module is also used for detecting printing requirement information and printing configuration information; the initialization module is also used for setting a main printing program according to the frame conversion program and the printing configuration information;
the mode setting module is used for setting a type threshold value and acquiring a file to be printed; the mode setting module is also used for analyzing file information of the file to be printed and setting a printing mode based on the statistical analysis program, the type threshold and the file information;
the operation execution module is used for executing a printing matching operation on the file to be printed based on the page number threshold value, the printing requirement information and the main printing program when the printing mode is a single printing mode;
the scheme configuration module is used for executing a printing scheme configuration operation based on the printing requirement information and the main printing program when the printing mode is a multi-printing mode, so as to obtain a pre-printing scheme; the scheme configuration module is also used for printing the file to be printed according to the pre-printing scheme;
the setting of the print mode based on the statistical analysis program, the type threshold, and the file information further includes: the mode setting module identifies the file type in the file information, invokes the statistical analysis program to count the type number of the file type, and compares whether the type number is matched with the type threshold; if so, the mode setting module sets the printing mode as the single printing mode; if the print modes are not matched, the mode setting module sets the print modes to be the multiple print modes;
the setting of the main printing program according to the frame conversion program and the printing configuration information further includes: the initialization module identifies whether program frame information matched with the frame conversion program exists in the printing configuration information; if yes, the initialization module sets the frame conversion program as the main printing program; if not, the initialization module acquires the host printing program information in the printing configuration information, and the initialization module identifies whether the in-place information of the host printing program in the host printing program information is empty; if not, the initialization module sets the host printing program matched with the host printing program information as the host printing program.
8. A computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program when executed by a processor implements the steps of the method for printing a multi-type file according to any one of claims 1 to 6.
CN202110914024.8A 2021-08-10 2021-08-10 Printing method, system and medium for multi-type files Active CN113791745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110914024.8A CN113791745B (en) 2021-08-10 2021-08-10 Printing method, system and medium for multi-type files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110914024.8A CN113791745B (en) 2021-08-10 2021-08-10 Printing method, system and medium for multi-type files

Publications (2)

Publication Number Publication Date
CN113791745A CN113791745A (en) 2021-12-14
CN113791745B true CN113791745B (en) 2023-10-03

Family

ID=78875821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110914024.8A Active CN113791745B (en) 2021-08-10 2021-08-10 Printing method, system and medium for multi-type files

Country Status (1)

Country Link
CN (1) CN113791745B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402404A (en) * 2010-09-10 2012-04-04 富士施乐株式会社 Print control apparatus, printing system, and print control method
CN111880755A (en) * 2020-08-07 2020-11-03 北京速票通科技有限公司 Printing method, printing device, electronic equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11243724B2 (en) * 2019-09-12 2022-02-08 Xerox Corporation Methods and systems for printing an address without an external device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402404A (en) * 2010-09-10 2012-04-04 富士施乐株式会社 Print control apparatus, printing system, and print control method
CN111880755A (en) * 2020-08-07 2020-11-03 北京速票通科技有限公司 Printing method, printing device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN113791745A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN102446076B (en) Printing system, printing method, print server, and control method
US20100097651A1 (en) Printer and printing method
US8314964B2 (en) Image processing apparatus and image processing method
US9645770B2 (en) Information processing system, information processing apparatus, information processing method, and storage medium storing program
US9507544B2 (en) Information processing apparatus, recording medium, and control method to process print data using filters
US20070223025A1 (en) Printing Apparatus and Method, Computer-Readable Medium, and Computer Data Signal
CN112732206A (en) Print control method, print driving apparatus, and computer-readable storage medium
US8982394B2 (en) Scan server, scan device, scan service method and scan service program
US6754731B2 (en) Device settings based on usage history
US8199967B2 (en) Image processing apparatus, image processing method, and storage medium
CN113791745B (en) Printing method, system and medium for multi-type files
US20130335792A1 (en) Detecting common errors in repeated scan workflows by use of job profile metrics
US7986419B2 (en) Performance optimization method for network printers
US8358436B2 (en) Systems and methods for efficiently handling imaging job settings
US8004723B2 (en) Information processing apparatus and image processing apparatus executing script stored in association with storage region
US20070291294A1 (en) Printing apparatus, print control method, program, and storage medium
US8804141B2 (en) Character output device, character output method and computer readable medium
US20110038001A1 (en) Printing control method, a computer readable storage medium storing instructions of a computer program thereof, and an image formation device
JP2007323642A (en) System and method for outputting electronic document to recording medium
US8736929B2 (en) Recording and recalling of scan build job and scan batch job settings
JP2006165863A (en) Information processing system
JP2009054153A (en) System and method for customizing driver of document processing device
US20040223181A1 (en) Control method relating to image formation and image formation method
US9560238B2 (en) Portable terminal capable of displaying image, control method therefor, and storage medium storing control program therefor
US9031445B2 (en) Power saving modes in an image forming 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