CN113791745A - 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
CN113791745A
CN113791745A CN202110914024.8A CN202110914024A CN113791745A CN 113791745 A CN113791745 A CN 113791745A CN 202110914024 A CN202110914024 A CN 202110914024A CN 113791745 A CN113791745 A CN 113791745A
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.)
Granted
Application number
CN202110914024.8A
Other languages
Chinese (zh)
Other versions
CN113791745B (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

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/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 invention discloses a method, a system and a medium for printing multi-type files, wherein the method comprises the following steps: configuring a statistical analysis program and a framework conversion program; detecting printing demand 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 the file information of the file to be printed; setting a printing mode based on the statistical analysis program, the type threshold value and the file information; when the printing mode is the single printing mode, executing 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 printing scheme configuration operation based on the printing requirement information and the main printing program to obtain a pre-printing scheme; printing a file to be printed based on a pre-printing scheme; the invention can be applied to various types of original papers to be printed, flexibly regulates and controls a high-efficiency printing scheme, and has strong flexibility and adaptability.

Description

Printing method, system and medium for multi-type files
Technical Field
The invention relates to the technical field of file printing, 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 conventional and is mainly applied to PDF files, when an original file to be printed is not a PDF file, the problems of proportion distortion, disordered format, single size and low printing efficiency can occur with high probability, so that the user experience is greatly influenced, and the printing method cannot be applied to printing equipment in various scenes.
Disclosure of Invention
The invention mainly solves the problem that the existing printing method is poor in flexibility, adaptability and diversity.
In order to solve the technical problems, the invention adopts a technical scheme that: a printing method of multi-type files is provided, which comprises the following steps:
initialization:
setting a page number threshold value;
configuring a statistical analysis program and a framework conversion program;
detecting printing demand information and printing configuration information;
setting a main printing program based on the framework conversion program and the printing configuration information;
setting a printing mode:
setting a type threshold value, and acquiring a file to be printed;
analyzing the file information of the file to be printed;
setting a printing mode based on the statistical analysis program, the type threshold, and the file information;
a printing step:
when the printing mode is a single printing mode, executing 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 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 preprinting 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 the file type in the file information, calling the statistical analysis program to count the number of the types of the file, and comparing whether the number of the types is matched with the type threshold value;
if the single printing mode is matched with the single printing mode, setting the printing mode as the single printing mode; and 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 framework 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 the host printing program information does not exist, acquiring the host printing program information in the printing configuration information, and identifying whether the in-place information of the host printing program in the host printing program information is empty; and if not, setting the host printing program matched with the host printing program information as the main printing program.
As an improved solution, the framework conversion program includes: a web page conversion program and a picture conversion program;
the host printing program includes: text analysis program, picture capture program, PDF analysis program and image-text processing program.
As an improvement, 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 demand information; comparing whether the output page number information is matched with the page number threshold value;
if the matching is carried out, calling the picture capturing program to carry out image capturing processing on the file to be printed to obtain a captured picture file; calling the picture analysis program or the picture conversion program to perform image analysis on the snap-in file to obtain an identification image; calling 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.
As an improved aspect, the printing scheme configuring 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 has a text file, a picture file and a PDF file:
when the type superposition condition is a second condition, setting a second printing scheme based on the output specification information and the main printing program; the second case includes: the files to be printed simultaneously comprise text files and webpage files, 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 the non-simultaneous text file, the photo file and the PDF file exist, and the non-simultaneous text file and the web page file exist;
the first printing scheme and the second printing scheme are both the pre-printing scheme.
As an improvement, the first printing scheme includes:
calling the text analysis program to analyze 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 class file to obtain a second picture to be converted;
calling the picture capturing program and the picture analyzing program to analyze the PDF file to obtain a third picture to be converted;
calling 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 and the fifth PDF file 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 present invention also provides a printing system for multi-type files, 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, configuring a statistical analysis program and a framework conversion program; the initialization module is also used for detecting printing demand 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 and acquiring a file to be printed; the mode setting module is also used for analyzing the 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 printing matching operation on the file to be printed based on the page number threshold, the printing demand information and the main printing program when the printing mode is a single printing mode;
the scheme configuration module is used for executing 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 preprinting scheme.
The present invention 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 the multi-type file.
The invention has the beneficial effects that:
1. the printing method of the multi-type files can realize quick embedding of applied equipment, has simple structure and low configuration difficulty, can be applied to various types of original documents to be printed, flexibly regulates and controls the printing scheme with the highest efficiency, has strong flexible adaptability and extremely high universality, and can be applied to various scenes.
2. The printing system of the multi-type files can realize compatible matching of various types of original documents to be printed and flexibly regulate and control the printing scheme with the highest efficiency through the mutual matching of the initialization module, the mode setting module, the operation execution module and the scheme configuration module, has strong flexibility and adaptability and extremely high universality, and can be applied to various scenes.
3. The computer-readable storage medium can realize the cooperation 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 originals to be printed, flexibly regulate and control the printing scheme with the highest efficiency, and effectively improve the operability of the printing method of various types of files.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for printing multi-type files according to embodiment 1 of the present invention;
fig. 2 is a schematic specific flowchart of step S100 according to embodiment 1 of the present invention;
fig. 3 is a schematic specific flowchart of step S200 according to embodiment 1 of the present invention;
fig. 4 is a schematic specific flowchart of step S300 according to embodiment 1 of the present invention;
fig. 5 is an architecture diagram of a printing system for multi-type files according to embodiment 2 of the present invention.
Detailed Description
The following detailed description of the preferred embodiments of the present invention, taken in conjunction with the accompanying drawings, will make the advantages and features of the invention easier to understand by those skilled in the art, and thus will clearly and clearly define the scope of the invention.
In the description of the present invention, it should be noted that the described embodiments of the present invention are a part of the embodiments of the present invention, and not all embodiments; all other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, 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 invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "page number threshold", "statistical analysis program", "frame conversion program", "print requirement information", "print configuration information", "main print program", "type threshold", "file to be printed", "file information", "print mode", "print matching operation", "print scheme configuration operation", "pre-print scheme", "single print mode", "multi-print mode", "program frame information", "in-place information", "host print program", "web page conversion program", "picture conversion program", "text parser", "picture capture program", "PDF parser", "text processing program", "PDF-like file", "output page number information"), The terms "image capturing process", "capture file", "identification image", "type superimposition condition", "print scheme", "output specification information", "initialization module", "mode setting module", "operation execution module", and "scheme configuration module" are to be understood in a broad sense. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it is to be noted that: the embodiment is mainly applied to the credit self-service terminal under the Linux system, and includes but is not limited to the Linux system.
In the description of the present invention, it is to 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 hypertext markup language; image is a picture format.
Example 1
The embodiment provides a method for printing multi-type files, as shown in fig. 1 to 4, comprising the following steps:
s100, initialization:
step S100 specifically includes:
s110, setting a page number threshold; in this embodiment, the threshold of the number of pages is 1, and the threshold of the number of pages is used to determine whether the printing requirement corresponding to the PDF file is single-page output or multi-page output;
s120, configuring a statistical analysis program and a framework conversion program; correspondingly, in this embodiment, the statistical analysis program may use a statistical function similar to the JMP analysis software principle; the framework conversion program is a conversion program based on a QT framework;
s130, detecting printing demand information and printing configuration information; in this embodiment, the printing requirement information is the size, margin, direction, scaling, etc. that the client needs to print the file; the printing configuration information is a software program or hardware data carried by or configured in advance by printing equipment in the applied terminal;
s140, setting a main printing program based on the framework conversion program and the printing configuration information; correspondingly, because the conversion program based on the QT frame can be efficiently used only by a 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 the host printing program information does not exist, acquiring the host printing program information in the printing configuration information, and identifying whether the in-place information of the host printing program in the host printing program information is empty; if not, setting the host printing program matched with the host printing program information as the main 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 indicates that the program can be started in standby; if the bit value is null, it indicates that the program is not configured or locked and cannot be started, and needs to be reconfigured or awakened; considering that a printing program in the printing equipment is in an on-position state, if the printing program is not in the on-position state, awakening operation of a corresponding program is required; when the awakening operation is executed, the time consumption for reconfiguring the QT framework and the awakening operation needs to be calculated, and the step with less time consumption is selected for execution;
specifically, the framework conversion program includes: a web page conversion program and a picture conversion program; the host printing program includes: a text analysis program, a picture analysis program, an HTML conversion program, a picture capture program, a PDF analysis program and a picture and text processing program; in this embodiment, the web page conversion program is QWebEngine; the picture conversion program is a QT graph 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 imagemap image conversion program; correspondingly, in the present embodiment, the specific program is only an implementation manner, and it can be replaced by a program, a function, or a script that can produce the same technical effect in other frameworks.
S200, setting a printing mode:
step S200 specifically includes:
s210, setting a type threshold value, and acquiring a file to be printed; correspondingly, in the embodiment, the type threshold is set to 1, that is, more than 1 type of file is set to another mode for printing;
s220, analyzing the file information of the file to be printed; correspondingly, in the embodiment, one or more files to be printed are provided; the file information includes the number, type, etc. of 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 the file type in the file information, calling the statistical analysis program to count the number of the types of the file, and comparing whether the number of the types is matched with the type threshold value; if the single printing mode is matched with the single printing mode, setting the printing mode as the single printing mode; 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; if the number of types is not more than the type threshold, the number of types is matched with the type threshold; correspondingly, the most suitable and most efficient printing mode is designed for the corresponding file to be printed through setting the printing mode in the step, and the flexible adaptability of the printing method is further improved.
S300, printing:
step S300 specifically includes:
s310, when the printing mode is a single printing mode, executing printing matching operation on the file to be printed based on the page number threshold, 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 the embodiment, the file to be printed is converted into a file matched with the output specification information according to the printing matching operation and by combining a specific main printing program; correspondingly, the output specification information is the size, margin, direction, scaling requirement and the like of the file to be printed by the client; correspondingly, if the first PDF file does not match the output specification information in the printing requirement information, the first PDF file needs to be modified by a format modification program attached to the printing device to meet the requirements of the customer.
Correspondingly, considering that when the file to be printed is directly a PDF file, in order to output the 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 the PDF files are matched with the PDF files, calling the picture capturing program to capture the images of the files to be printed to obtain captured files, wherein in the step, the picture capturing program only aims at the output and adjustment of the single-page PDF files, so that the steps are carried out according to the page number threshold; calling the picture analysis program or the picture conversion program to perform Image analysis on the Image capture file to obtain an identification Image, wherein the identification Image is an Image object; calling 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, 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; in this embodiment, the output page number information is matched with the page number threshold, and if the output page number information is different from the page number threshold, the output page number information is not matched; correspondingly, through the steps, various types of files can be efficiently printed in a single printing mode, the problem that the PDF files are not matched with the output specification information is solved for the PDF files, the requirements of users are met, and the user experience is improved.
S320, when the printing mode is a multi-printing mode, executing 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 preprinting scheme;
specifically, the printing scheme configuring operation includes: detecting the type superposition condition of the file to be printed; in this embodiment, considering that when multiple types of files exist simultaneously, some files are compatible with one program at the same time, designing a printing scheme according to this idea will make the printing efficiency more efficient, so 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 has a text file, a picture file and a PDF file: correspondingly, the type superposition condition is the combination condition of the file types in the file to be printed; when the file to be printed simultaneously has a text file, a picture file and a PDF file, a host printing program can be simultaneously applied to operate, 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 of a QT frame or a host printing program can be adopted according to the actual situation, so that the efficiency difference is not much, the influence range on the efficiency is low, and the calculation is not carried out in the situation;
correspondingly, the first printing scheme comprises the following steps:
calling the text analysis program to analyze 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 class file to obtain a second picture to be converted; calling the picture capturing program and the picture analyzing program to analyze the PDF file to obtain a third picture to be converted; calling 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 all host printing programs, a conversion program of a QT frame does not need to be started, and the efficiency is extremely high;
when the type superposition condition is a second condition, setting a second printing scheme based on the output specification information and the main printing program; the second case includes: the files to be printed simultaneously comprise text files and webpage files, 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 and the fifth PDF file 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 files to be printed only have two types of webpage files and text files, the two types of files can be respectively converted only by calling the webpage conversion program under the QT frame, so that the efficiency is high, the operation is simple, and the user experience is improved; correspondingly, the first printing scheme and the second printing scheme are both the preprinting scheme.
When the type superposition condition is a third condition, executing the printing matching operation; the third condition is the type superposition condition except the first condition and the second condition, namely the non-simultaneous existence of the text type file, the picture type file and the PDF type file and the non-simultaneous existence of the text type file and the webpage type file;
correspondingly, except the above situation, the printing matching operation is executed corresponding to the files to be printed under other types of superposition conditions, namely, the corresponding programs are selected according to the types for conversion and printing, so that the efficiency is extremely high;
correspondingly, there are several print matching operations illustrated here:
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 for printing through a webpage conversion program;
when the file to be printed is a webpage file, the webpage file can be directly converted into a target PDF file for printing through a webpage conversion program; or directly converting the webpage class file into a target PDF file by adopting an HTML conversion program for printing;
when the file to be printed is a picture file, converting the picture 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 for printing through a picture-text processing program;
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 capturing program and a picture analyzing program, and converting the Image object into a target PDF file for printing through an Image-text processing program; or the PDF type file is directly converted into a target PDF file for printing through a PDF analysis program; in each of the above cases, the program and the executed operation are selected according to the specific print configuration information and the print requirement information.
By the method for printing the multiple types of files described in this embodiment 1, the most efficient printing scheme can be flexibly configured for the multiple types of files, the method has extremely high applicability, high degree of automation, simple operation and strong universality, and the defects in the prior art are overcome.
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 files, an initialization module is used for setting a page number threshold value, configuring a statistical analysis program and a framework conversion program; the initialization module is also used for detecting printing demand 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 the frame printing program exists, the initialization module sets the main printing program as the frame printing program; if the host printing program information does not exist, 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 or not; if not, the initialization module sets the host printing program matched with the host printing program information as the main printing program.
In the printing system of the multi-type files, a mode setting module is used for setting type thresholds and acquiring files to be printed; the mode setting module is also used for analyzing the 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 file types in the file information, calls the statistical analysis program to count the number of the types of the file, and compares whether the number of the types is matched with the type threshold value or not; if the single printing mode is matched with the single printing mode, the mode setting module sets the printing mode to be the single printing mode; if not, the mode setting module sets the printing mode to be the multi-printing mode.
In the printing system of the multi-type files, the operation execution module is used for executing printing matching operation on the files to be printed based on the page number threshold, the printing demand 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, identifying output page number information in the printing demand information by an operation execution module, and comparing whether the output page number information is matched with the page number threshold value; if the matching is successful, the operation execution module calls the picture capture program to capture the image of the file to be printed to obtain a capture file; the operation execution module calls the picture analysis program or the picture conversion program to carry out image analysis on the snap-in 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; if not, 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, a scheme configuration module is used for executing 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 preprinting scheme;
specifically, the printing scheme configuring operation includes: a 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 has 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 calls the picture analysis program to analyze the picture files to obtain a second picture to be converted; the scheme configuration module calls the picture capturing 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 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 respectively; a 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 files to be printed simultaneously comprise text files and webpage files, 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 file and the webpage file 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 a 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 condition is the type superposition condition except the first condition and the second condition, namely the non-simultaneous existence of the text type file, the picture type file and the PDF type file and the non-simultaneous existence of the text type file and the webpage type file; correspondingly, the first printing scheme and the second printing scheme are both the preprinting scheme.
Through the printing system of the multi-type files described in this embodiment 2, the most efficient printing scheme can be flexibly configured for the multi-type files through the mutual cooperation among the initialization module, the mode setting module, the operation execution module and the scheme configuration module, so that the printing system has extremely high applicability, high degree of automation, simple operation and strong universality, and overcomes the defects of the prior art.
Example 3
The present embodiments provide a computer-readable storage medium comprising:
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 comprises a program for executing the above program set for the printing method of the multi-type file; specifically, the executable program may be built in the multi-type file printing system described in embodiment 2, so that the multi-type file printing system may implement the multi-type file printing method described in embodiment 1 by executing the built-in executable program.
Furthermore, the computer-readable storage medium of the present embodiments may take any combination of one or more readable storage media, where a readable storage medium includes an electronic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
Different from the prior art, the printing method, the printing system and the printing medium of the multi-type files can adapt to various types of original documents to be printed through the method, and flexibly regulate and control the printing scheme with the highest efficiency; the system provides effective technical support for the method, and the system and the method have strong flexible adaptability and high universality and can be applied to various scenes.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, and a program that can be implemented by the hardware and can be instructed by the program to be executed by the relevant hardware may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic or optical disk, and the like.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for printing multiple types of files, comprising the steps of:
initialization:
setting a page number threshold value;
configuring a statistical analysis program and a framework conversion program;
detecting printing demand information and printing configuration information;
setting a main printing program based on the framework conversion program and the printing configuration information;
setting a printing mode:
setting a type threshold value, and acquiring a file to be printed;
analyzing the file information of the file to be printed;
setting a printing mode based on the statistical analysis program, the type threshold, and the file information; a printing step:
when the printing mode is a single printing mode, executing 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 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 preprinting scheme.
2. The method of printing a multi-type document according to claim 1, wherein the step of setting a printing mode based on the statistical analysis program, the type threshold value, and the document information further comprises:
identifying the file type in the file information, calling the statistical analysis program to count the number of the types of the file, and comparing whether the number of the types is matched with the type threshold value;
if the single printing mode is matched with the single printing mode, setting the printing mode as the single printing mode; and if not, setting the printing mode as the multi-printing mode.
3. The method for printing a multi-type file according to claim 2, wherein the step of setting a main printing program based on the framework conversion program and the printing configuration information further comprises:
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 the host printing program information does not exist, acquiring the host printing program information in the printing configuration information, and identifying whether the in-place information of the host printing program in the host printing program information is empty; and if not, setting the host printing program matched with the host printing program information as the main printing program.
4. The method for printing a multi-type document according to claim 3, wherein the framework conversion program comprises: a web page conversion program and a picture conversion program;
the host printing program includes: text analysis program, picture capture program, PDF analysis program and image-text processing program.
5. The method of printing the multi-type document according to claim 4, wherein the print matching operation comprises:
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.
6. The method of printing a multi-type document of claim 5, wherein said print matching operation further comprises:
when the file type is a PDF file, identifying output page number information in the printing demand information; comparing whether the output page number information is matched with the page number threshold value;
if the matching is carried out, calling the picture capturing program to carry out image capturing processing on the file to be printed to obtain a captured picture file; calling the picture analysis program or the picture conversion program to perform image analysis on the snap-in file to obtain an identification image; calling 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.
7. The method of printing the multi-type document according to claim 5 or 6, wherein the printing scheme configuring 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 has a text file, a picture file and a PDF file:
when the type superposition condition is a second condition, setting a second printing scheme based on the output specification information and the main printing program; the second case includes: the files to be printed simultaneously comprise text files and webpage files, 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 the non-simultaneous text file, the photo file and the PDF file exist, and the non-simultaneous text file and the web page file exist;
the first printing scheme and the second printing scheme are both the pre-printing scheme.
8. The method of printing a multi-type document according to claim 7, wherein the first printing scheme comprises:
calling the text analysis program to analyze 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 class file to obtain a second picture to be converted;
calling the picture capturing program and the picture analyzing program to analyze the PDF file to obtain a third picture to be converted;
calling 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 and the fifth PDF file are matched with the output specification information; and printing the fourth PDF file to be printed and the fifth PDF file to be printed.
9. A system for printing 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, configuring a statistical analysis program and a framework conversion program; the initialization module is also used for detecting printing demand 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 and acquiring a file to be printed; the mode setting module is also used for analyzing the 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 printing matching operation on the file to be printed based on the page number threshold, the printing demand information and the main printing program when the printing mode is a single printing mode;
the scheme configuration module is used for executing 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 preprinting scheme.
10. 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 for multiple types of documents of any one of claims 1-8.
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 true CN113791745A (en) 2021-12-14
CN113791745B 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 (3)

* 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
US20210081150A1 (en) * 2019-09-12 2021-03-18 Xerox Corporation Methods and systems for printing an address without an external device

Patent Citations (3)

* 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
US20210081150A1 (en) * 2019-09-12 2021-03-18 Xerox Corporation Methods and systems for printing an address without an external device
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
CN113791745B (en) 2023-10-03

Similar Documents

Publication Publication Date Title
US8203748B2 (en) Image processing apparatus, control method therefor, and program
US7986429B2 (en) Printer and printing method
CN101800826B (en) Image processing apparatus, terminal, printer apparatus and image processing method, having image restoring function
US8131081B2 (en) Image processing apparatus, and computer program product
US8095868B2 (en) Document management device and document management method
US20070020009A1 (en) Image processing apparatus, image processing method, and program therefor
JP7234024B2 (en) Information processing device, information processing method and program
US20080018949A1 (en) Image combining apparatus, control method for image combining apparatus, and program
US11418658B2 (en) Image processing apparatus, image processing system, image processing method, and storage medium
US8199967B2 (en) Image processing apparatus, image processing method, and storage medium
US20100231961A1 (en) Image processing apparatus, system, and image processing method
US7738737B2 (en) Image processing apparatus and image processing method
US8074164B2 (en) Document management device and document management method
US8854695B2 (en) Image processing apparatus, method, and program
CN113791745B (en) Printing method, system and medium for multi-type files
CN111753850A (en) Document processing method and device, computer equipment and computer readable storage medium
US20160352934A1 (en) Information processing apparatus that creates other documents from read document
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
US20040243937A1 (en) Print job management device
JP2007323642A (en) System and method for outputting electronic document to recording medium
JP2006165863A (en) Information processing system
US9560238B2 (en) Portable terminal capable of displaying image, control method therefor, and storage medium storing control program therefor
US20040223181A1 (en) Control method relating to image formation and image formation method
US20130335793A1 (en) Recording and recalling of scan build job and scan batch job settings

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