[go: up one dir, main page]

CN117908808B - Printing method, equipment and storage medium for multiple jobs of different tasks - Google Patents

Printing method, equipment and storage medium for multiple jobs of different tasks Download PDF

Info

Publication number
CN117908808B
CN117908808B CN202410079579.9A CN202410079579A CN117908808B CN 117908808 B CN117908808 B CN 117908808B CN 202410079579 A CN202410079579 A CN 202410079579A CN 117908808 B CN117908808 B CN 117908808B
Authority
CN
China
Prior art keywords
printing
file
print
task
data
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
CN202410079579.9A
Other languages
Chinese (zh)
Other versions
CN117908808A (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.)
Guangzhou Senyang Electronic Technology Co ltd
Original Assignee
Guangzhou Senyang Electronic 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 Guangzhou Senyang Electronic Technology Co ltd filed Critical Guangzhou Senyang Electronic Technology Co ltd
Priority to CN202410079579.9A priority Critical patent/CN117908808B/en
Publication of CN117908808A publication Critical patent/CN117908808A/en
Application granted granted Critical
Publication of CN117908808B publication Critical patent/CN117908808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1211Improving printing performance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1244Job translation or job parsing, e.g. page banding
    • G06F3/1245Job translation or job parsing, e.g. page banding by conversion to intermediate or common format
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1259Print job monitoring, e.g. job status
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/126Job scheduling, e.g. queuing, determine appropriate device
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/126Job scheduling, e.g. queuing, determine appropriate device
    • G06F3/1263Job scheduling, e.g. queuing, determine appropriate device based on job priority, e.g. re-arranging the order of jobs, e.g. the printing sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The invention discloses a printing method, equipment and a storage medium for multiple jobs of different tasks, and relates to the technical field of printers; through the steps S1-S15, the invention performs a printing initialization action when printing is started, instead of performing initialization operation every time when the tasks are switched, so that repeated initialization time can be saved, printing efficiency is improved, different printing areas are switched according to the identification of the tasks in the printing process by distributing a unique zone bit to each printing task, and thus, the spray head can be directly switched to the corresponding position without a back bin seal head, thereby reducing waiting time of switching the tasks, omitting actions of spraying the back bin seal head and discharging the back bin when each printing job of each task is switched, saving time of returning and discharging each printing job, and greatly improving production efficiency.

Description

Printing method, equipment and storage medium for multiple jobs of different tasks
Technical Field
The invention relates to the technical field of printers, in particular to a printing method, equipment and a storage medium for multiple jobs of different tasks.
Background
When a traditional printing mode prints single-copy and multi-copy printing jobs of different tasks, the spraying vehicle needs to return to the bin end enclosure and then print when the next task is switched to print, the requirement of improving the production efficiency of a client cannot be met, the client needs to start the task once and only perform a printing initialization action, and follow-up actions switch different printing areas according to the identifications of different tasks, so that the printing production efficiency is improved.
Disclosure of Invention
The invention aims to provide a printing method, equipment and storage medium for multiple jobs of different tasks, which omits the actions of spraying a vehicle returning seal head and discharging a warehouse when each print job of each task is switched, saves the time of returning and discharging each print job and can greatly improve the production efficiency.
The aim of the invention can be achieved by the following technical scheme:
The application provides a printing method for multiple jobs of different tasks, which comprises the following steps:
s1: on-line, starting printer control software and then establishing connection with a printer;
s2: loading files, loading a plurality of files to be printed by a user, importing the printed files into a printing list, and setting the number of printing copies of each task;
S3: importing a list, and storing the print file into the print list;
S4: initializing all print data including a print state and a printing device, and setting the accumulated number of printed tasks to 0;
s5: printing is started, a print job is created, and a print starting command is sent to a printer;
s6: opening a file, opening a file from a printing list, opening the file to be printed by printer control software, reading PRN file header information, and obtaining information of a printed image;
s7: the mark assignment, the print mark bit assignment, the mark bit value is equal to the current task serial number multiplied by the current printing number and then the remainder is taken for 2;
s8: positioning data, wherein a file pointer points to first line data of a printing file and is ready to start reading the printing data;
S9: reading data, namely reading the data of the PRN file row by row according to each BytesPerLine of each color, and preparing to be sent to the printer device;
s10: transmitting data, and transmitting the printing data and the printing zone bit to the printer equipment when the printing data collect a Slice which is printed enough;
S11: judging the file, judging whether the PRN file finishes reading the last line of data of the file, if the file does not finish reading, jumping to the step, and repeating the step S9 to continue reading the data, sending the data and judging the file;
S12: decreasing the number of printing copies, decreasing 1 for the total number of printing copies, judging whether the number of printing copies is zero, if not, jumping to the step S7, and continuing to print the next number of copies of the current task;
s13: updating the number of printed tasks, and adding 1 to the number of printed tasks to record the number of completed printed tasks;
S14: judging the task list, judging whether all the print task list is printed, and jumping to the step S6 if the print task list is not printed;
S15: and ending printing, ending the printing task, exiting the printing and the printing task, and closing the printer.
Preferably, the printer control software establishes communication connection with the printer device, the printer control software loads files to be printed and sets the number of printing copies, the printing control software can use each printed file as a small printing unit, a large printing unit is further set, all the small printing units are combined into a large printing unit, and a flag bit is set for each small printing unit, wherein each small printing unit has a flag bit for distinguishing each small printing unit, and the value of the flag bit= (current task serial number is current number of copies)% 2; * Representing multiplication,% represents remainder.
Preferably, during initialization, the printer control software only needs to create a print job, send large print unit data to the printer for setting, the printer identifies each small print unit according to the flag bit, and finally only needs to send a print end command to end printing, so that the printer does not need to repeat the actions of initializing and ending printing for multiple times when performing multiple times of printing, the printer program identifies the control bit of each small print unit, the spraying vehicle stops at the position set by the user after each small unit is printed, then when the user puts an object to be printed and presses a continue print button, and the printer automatically adjusts and switches the next small print unit to continue printing after receiving the trigger signal.
Preferably, according to the assignment of the flag in step S7, a unique flag bit is allocated to each print job, and the identification and distinction are performed in the printing process, which specifically includes:
The current task serial number is allocated to each task according to the sequence of the tasks in the printing task list, the task serial number is increased from 1, and the tasks are allocated in sequence according to the sequence of the tasks in the list;
the current number of prints, the number of prints required for each job, is set, designated by the user when loading the file, and recorded in the job information,
Calculating a zone bit, multiplying the current task number by the current number of printing copies, and taking the remainder of 2, namely, the value of the zone bit is equal to (the current task number multiplied by the current number of printing copies)% 2;
the flag bit is used, the calculated flag bit is assigned to the print task, and each task is assigned a unique flag bit for identifying the print status or other information of the task.
Preferably, the positioning data according to step S8, pointing the file pointer to the first line data of the print file in preparation for starting reading the print data, specifically includes:
In print control software, a file to be printed is opened by using a file operation function, the opened file is designated by a file path or a file name, a file pointer is moved to a first row data position of the printed file by file pointer operation, the file pointer is moved to the beginning of the file by using a file pointer offset function fseek (), and then file header information is skipped according to a file format and a structure;
And directly reading the first line of data without moving a file pointer, if the file format allows the first line to be directly read, preparing to read the printing data, ensuring that the printing data is read line by using a file reading function after the file pointer is correctly positioned, and selecting a reading mode for reading the text file line by line according to the format and the structure of the file.
Preferably, according to the read data in step S9, the PRN file data is read line by line according to the size of BytesPerLine of each color, and ready to be sent to the printer device, and the byte length BytesPerLine and the number of colors of each color are set according to the format of the print file and the requirements of the printer device;
And reading the data of the PRN file according to the rows, traversing each row by circulation until the whole PRN file is read, cutting or analyzing the data of each row according to BytesPerLine of each color to obtain the printing data of each color, converting the data of each color into a corresponding format according to the communication protocol and the data format requirement of the printer equipment, and transmitting the data of each color to the printer equipment.
Preferably, a print queue management module is introduced to optimally schedule print tasks, and print job sequences and allocations of different tasks are reasonably arranged to minimize task switching time, and the method specifically comprises the following steps:
Sequencing the print jobs, sequencing the jobs in the print queue according to factors such as the size of a print file, the estimated printing time and the like, and using a First Come First Serve (FCFS) or priority scheduling algorithm to put the jobs with shorter printing time in front, so that the waiting time for task switching is reduced;
The resource allocation, according to the characteristics of the printer and available resources, reasonably allocating tasks to the printer equipment, allocating the jobs which are suitable for simultaneous processing to the printer, and controlling the concurrence number of each job;
Priority scheduling, namely distributing priorities to different printing tasks according to user setting or system requirements;
Dynamically adjusting, namely dynamically adjusting the sequence and allocation of tasks in a printing queue according to the real-time state and the resource utilization condition of a printer, and suspending or rescheduling a certain job when the problem occurs in the printing process or additional processing time is required;
The printing time is estimated, and the completion time of each print job is estimated through analysis of the characteristics of the printer device and the file.
Preferably, a print job management module is introduced, and management and monitoring of print jobs are realized in print control software, and specifically comprises
A print job list, in which a current print job list including all print jobs being performed or waiting for execution and information of the jobs is displayed in print control software;
task state monitoring, namely monitoring the state of a printing task in real time, checking the current state of each task, and displaying the residual time and the printed page number information of the task;
Task operation, namely performing operation functions of printing tasks, including task pause, cancel and restart, and performing pause operation or task cancel on the ongoing tasks;
error processing, when an error or abnormality occurs in a print job, capturing and performing corresponding error processing by a print job management module;
and finishing task statistics, recording the number of finished printing tasks, and providing a statistical report.
A printing apparatus for multiple jobs for different tasks, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method described above.
A storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method described above.
The beneficial effects of the invention are as follows:
(1) When printing is started, a printing initialization action is performed instead of performing initialization operation every time of task switching, repeated initialization time can be saved, printing efficiency is improved, different printing areas are switched according to the identification of a task in the printing process by distributing a unique zone bit to each printing task, and therefore a spray head can be directly switched to a corresponding position without a warehouse-returning seal head, and waiting time for task switching is shortened;
(2) By starting a task once and optimizing the printing area according to the task identification, the idle time of the printer can be reduced, the printing production efficiency is improved, the printer can continuously print a plurality of printing jobs of different tasks, and the initialization operation is not required to be interrupted or repeated, so that the printing speed and the printing efficiency are effectively improved.
Drawings
For a better understanding and implementation, the technical solution of the present application is described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a printing method for multiple jobs with different tasks according to embodiment 1 of the present application.
Detailed Description
For further explanation of the technical means and effects adopted by the present application for achieving the intended purpose, exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of methods and systems that are consistent with aspects of the application as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
The following detailed description of specific embodiments, features and effects according to the present invention is provided with reference to the accompanying drawings and preferred embodiments.
Example 1
Referring to fig. 1, the present embodiment provides a printing method, apparatus and storage medium for multiple jobs of different tasks, which omits the actions of spraying a carriage returning seal head and discharging when each print job of each job is switched, saves the time of returning and discharging each print job, and can greatly improve the production efficiency.
The invention provides a printing method for multiple jobs of different tasks, which comprises the following steps:
s1: on-line, starting printer control software and then establishing connection with printer equipment;
s2: loading files, loading a plurality of files to be printed by a user, importing the printed files into a printing list, and setting the number of printing copies of each task;
S3: importing a list, and storing the print file into the print list;
S4: initializing all print data including a print state and a printing device, and setting the accumulated number of printed tasks to 0;
s5: printing is started, a print job is created, and a print starting command is sent to a printer;
S6: opening a file, opening a file from a printing list, opening the file to be printed by printer control software, reading PRN file header information, and obtaining information of a printed image, such as a check head, resolution, width, height, color number, PASS number, single-point two-point mode and the like;
s7: the mark assignment, the print mark bit assignment, the mark bit value is equal to the current task serial number multiplied by the current printing number and then the remainder is taken for 2;
s8: positioning data, wherein a file pointer points to first line data of a printing file and is ready to start reading the printing data;
S9: reading data, namely reading the data of the PRN file row by row according to each BytesPerLine of each color, and preparing to be sent to the printer device;
s10: transmitting data, and transmitting the printing data and the printing zone bit to the printer equipment when the printing data collect a Slice which is printed enough;
S11: judging the file, judging whether the PRN file finishes reading the last line of data of the file, if the file does not finish reading, jumping to the step, and repeating the step S9 to continue reading the data, sending the data and judging the file;
S12: decreasing the number of printing copies, decreasing 1 for the total number of printing copies, judging whether the number of printing copies is zero, if not, jumping to the step S7, and continuing to print the next number of copies of the current task;
s13: updating the number of printed tasks, and adding 1 to the number of printed tasks to record the number of completed printed tasks;
S14: judging the task list, judging whether all the print task list is printed, and jumping to the step S6 if the print task list is not printed;
S15: and ending printing, ending the printing task, exiting the printing and the printing task, and closing the printer.
Through the perfected contents of the steps, printing operation can be realized according to a preset printing file list and printing number of copies, each step has definite functions and operation, so that smooth proceeding of a printing process is ensured, the number of completed printing tasks is recorded, and printing efficiency and accuracy of managing the printing tasks can be improved.
In this embodiment, the print control software establishes communication connection with the printer device, the printer control software loads files to be printed and sets the number of print copies, the print control software uses each print file as a small print unit, sets a large print unit, combines all the small print units into a large print unit, and sets a flag bit for each small print unit, where each small print unit has a flag bit for distinguishing each small print unit, and the value of the flag bit= (current task number equals current number of copies)% 2; (% represents multiplication) and% represents remainder.
The fine granularity management and combination of a plurality of printing files can be realized, the printing efficiency and the production efficiency are improved, meanwhile, each small printing unit is distinguished by using the zone bit, the uniqueness and the accuracy of a printing task are ensured, the requirements of a user on efficient printing and task management can be met, and the utilization rate and the production capacity of printer resources are improved.
In this embodiment, during initialization, the printer control software only needs to create a print job, send large print unit data to the printer for setting, the printer identifies each small print unit according to the flag bit, and finally only needs to send a print end command to end printing, so that the printer does not need to repeat operations of initializing and ending printing multiple times when performing multiple times of printing, the printer program identifies a control bit of each small print unit, after each small unit is printed, the spraying vehicle stops at a position set by a user, then when the user puts an object to be printed and presses a continue print button, the printer automatically adjusts and switches the next small print unit to continue printing after receiving a trigger signal, thereby improving printing efficiency.
The continuous execution of the printing task can be realized, the repetition of the initialization and ending actions is reduced, different small printing units are identified according to the zone bit, the printing efficiency can be greatly improved, the production capacity of the printer is improved, and the requirement of a user on efficient printing is met.
In this embodiment, according to the flag assignment described in step S7, a unique flag bit is allocated to each print job to identify and distinguish in the printing process, which specifically includes:
The current task serial number is allocated to each task according to the sequence of the tasks in the printing task list, the task serial number is increased from 1, and the tasks are allocated in sequence according to the sequence of the tasks in the list;
the current number of prints, the number of prints required for each job, is set, designated by the user when loading the file, and recorded in the job information,
Calculating a zone bit, multiplying the current task number by the current number of printing copies, and taking the remainder of 2, namely, the value of the zone bit is equal to (the current task number multiplied by the current number of printing copies)% 2;
the flag bit is used, the calculated flag bit is assigned to the print task, and each task is assigned with a unique flag bit for identifying the print state of the task or other relevant information.
Through the content, a unique zone bit can be allocated to each print task, the calculation of the zone bit is based on the task serial number and the number of prints, so that each task is ensured to have different zone bits, accurate identification and distinction can be conveniently carried out in the printing process, the printing state of each task is conveniently tracked and managed, and the smooth proceeding of the printing process is ensured.
In this embodiment, according to the positioning data of step S8, the file pointer is pointed to the first line data of the print file in preparation for starting reading the print data, specifically including:
In print control software, a file to be printed is opened by using a file operation function, the opened file is designated by a file path or a file name, a file pointer is moved to a first row data position of the printed file by file pointer operation, the file pointer is moved to the beginning of the file by using a file pointer offset function fseek (), and then file header information is skipped according to a file format and a structure;
And directly reading the first line of data without moving a file pointer, if the file format allows the first line to be directly read, preparing to read the printing data, ensuring that the printing data is read line by using a file reading function after the file pointer is correctly positioned, and selecting a reading mode for reading the text file line by line according to the format and the structure of the file.
The file pointer is positioned to the first line of data of the printed file, so that preparation is made for subsequent data reading operation, the data is ensured to be read from a correct position, data dislocation or loss is avoided, and the printing operation can be smoothly carried out.
In this embodiment, according to the read data in step S9, the data of the PRN file is read line by line according to the size BytesPerLine of each color, and is ready to be sent to the printer device, and the byte length BytesPerLine and the number of colors of each color are set according to the format of the print file and the requirements of the printer device;
And reading the data of the PRN file according to the rows, traversing each row by circulation until the whole PRN file is read, cutting or analyzing the data of each row according to BytesPerLine of each color to obtain the printing data of each color, converting the data of each color into a corresponding format according to the communication protocol and the data format requirement of the printer equipment, and transmitting the data of each color to the printer equipment.
According to the size BytesPerLine of each color, the data of the PRN file is read row by row and ready to be sent to the printer device, so that the correctness and the integrity of the data can be ensured, and the requirements of the printer device are met.
In this embodiment, a print queue management module is introduced to perform optimal scheduling on print tasks, and print job sequences and allocations of different tasks are reasonably arranged to reduce task switching time to the greatest extent, thereby improving the utilization efficiency of printer resources, and specifically includes:
Sequencing the print jobs, sequencing the jobs in the print queue according to factors such as the size of a print file, the estimated printing time and the like, and using a First Come First Serve (FCFS) or priority scheduling algorithm to put the jobs with shorter printing time in front so as to reduce the waiting time of task switching;
the resource allocation, according to the characteristics of the printer and available resources, reasonably allocating tasks to the printer equipment, taking the factors such as the processing capacity, the memory capacity, the number of nozzles and the like of the printer into consideration, allocating the jobs which are suitable for simultaneous processing to the printer, and controlling the concurrency number of each job so as to avoid the reduction of printing quality or the slowing of printing speed caused by excessive jobs;
Priority scheduling, which is to allocate priorities to different printing tasks according to user setting or system requirements, for example, emergency tasks can be set to be high priority, so that timely completion of the emergency tasks is ensured, priority processing of important tasks can be ensured through priority scheduling, and working efficiency is improved;
dynamic adjustment, according to the real-time state and resource utilization condition of the printer, dynamically adjusting the sequence and allocation of tasks in the print queue, for example, when a problem occurs in the printing process of a certain job or additional processing time is required, suspending or rescheduling the job so as to ensure the optimal utilization of the printer resource;
The printing time is estimated, and the completion time of each printing job is estimated through analysis of the characteristics of the printer equipment and the file, so that the sequence and the distribution of the printing jobs can be more accurately arranged, and the waiting time of other jobs is prevented from being influenced due to longer time consumption of one printing job.
By the print queue management method, the scheduling and the distribution of the print tasks can be optimized, the task switching time is reduced to the greatest extent, the utilization efficiency of printer resources is improved, and the printing time is dynamically adjusted and estimated according to different requirements so as to improve the printing efficiency and the user experience.
In this embodiment, a print job management module is introduced to implement management and monitoring of print jobs in print control software, display information such as a current print job list, job status, number of completed jobs, etc., and provide operations such as job suspension, cancellation, restart, etc., including specifically
A print job list, in which a current print job list is displayed in print control software, including all print jobs being performed or waiting for execution, and related information of the jobs, such as job names, job status, print progress, etc.;
The task state monitoring is used for monitoring the state of the printing task in real time, and can check the current state of each task, such as printing, pausing, canceling, finishing and the like, and can display the information of the residual time, the printed page number and the like of the task, so that a user can know the progress condition of the task conveniently;
Task operation, providing operation functions for printing tasks, including task pause, cancel and restart, wherein a user can pause the ongoing tasks according to the needs so as to process other urgent tasks, and can cancel the tasks so as to avoid unnecessary printing consumption, and if the paused tasks need to be resumed, the tasks can be restarted;
Error handling, when a print job is in error or abnormal, the print job management module can capture and perform corresponding error handling, for example, when a printer is in fault, a file is damaged or network connection is interrupted, the system can automatically mark the job as error, and provide error prompt and solution;
And finishing task statistics, recording the number of finished printing tasks, providing corresponding statistical reports, and facilitating task management and performance evaluation of users.
By introducing the print job management, the comprehensive management and monitoring of the print job can be realized, the user can clearly know the current print job state and progress condition, and perform job operation and error processing according to the needs, and meanwhile, the number of completed jobs can be counted, so that the user can be helped to perform job management and performance analysis.
A printing apparatus for multiple jobs for different tasks, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method described above.
A storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method described above.
The present invention is not limited in any way by the above-described preferred embodiments, but is not limited to the above-described preferred embodiments, and any person skilled in the art will appreciate that the present invention can be embodied in the form of a program for carrying out the method of the present invention, while the above disclosure is directed to equivalent embodiments capable of being modified or altered in some ways, it is apparent that any modifications, equivalent variations and alterations made to the above embodiments according to the technical principles of the present invention fall within the scope of the present invention.

Claims (10)

1. A printing method for multiple jobs of different tasks is characterized in that: the method comprises the following steps:
s1: on-line, starting printer control software and then establishing connection with a printer;
s2: loading files, loading a plurality of files to be printed by a user, importing the printed files into a printing list, and setting the number of printing copies of each task;
S3: importing a list, and storing the print file into the print list;
S4: initializing all print data including a print state and a printing device, and setting the accumulated number of printed tasks to 0;
s5: printing is started, a print job is created, and a print starting command is sent to a printer;
s6: opening a file, opening a file from a printing list, opening the file to be printed by printer control software, reading PRN file header information, and obtaining information of a printed image;
s7: the mark assignment, the print mark bit assignment, the mark bit value is equal to the current task serial number multiplied by the current printing number and then the remainder is taken for 2;
s8: positioning data, wherein a file pointer points to first line data of a printing file and is ready to start reading the printing data;
S9: reading data, namely reading the data of the PRN file row by row according to each BytesPerLine of each color, and preparing to be sent to the printer device;
s10: transmitting data, and transmitting the printing data and the printing zone bit to the printer equipment when the printing data collect a Slice which is printed enough;
s11: judging the file, judging whether the PRN file finishes reading the last line of data of the file, if the file does not finish reading, jumping to the step S9, and repeating the step S9 to continue reading the data, sending the data and judging the file;
S12: decreasing the number of printing copies, decreasing 1 for the total number of printing copies, judging whether the number of printing copies is zero, if not, jumping to the step S7, and continuing to print the next number of copies of the current task;
s13: updating the number of printed tasks, and adding 1 to the number of printed tasks to record the number of completed printed tasks;
S14: judging the task list, judging whether all the print task list is printed, and jumping to the step S6 if the print task list is not printed;
S15: and ending printing, ending the printing task, exiting the printing and the printing task, and closing the printer.
2. A method of printing a plurality of jobs for different tasks as claimed in claim 1, wherein: the printer control software establishes communication connection with the printer equipment, the printer control software loads files to be printed and sets the number of printing copies, the printing control software can take each printing file as a small printing unit, a large printing unit is further arranged, all the small printing units are combined into one large printing unit, and a flag bit is set for each small printing unit, wherein each small printing unit has one flag bit for distinguishing each small printing unit.
3. A method of printing a plurality of jobs for different tasks as claimed in claim 1, wherein: when the printer is initialized, the printer control software only needs to create a printing task once and send large printing unit data to the printer for setting, the printer can identify each small printing unit according to the zone bit, and finally only needs to send a printing end command once to finish printing, so that the printer does not need to repeatedly perform actions of initializing and finishing printing when performing multiple times of printing, the printer program can identify the control bit of each small printing unit, the spraying vehicle can stop at a position set by a user after each small unit is printed, then when a user puts an object to be printed and presses a continuous printing button, and the printer automatically adjusts and switches the next small printing unit to continue printing after receiving a trigger signal.
4. A method of printing a plurality of jobs for different tasks as claimed in claim 1, wherein: according to the mark assignment in the step S7, a unique mark bit is allocated to each printing task, and the mark and the distinction are carried out in the printing process, wherein the specific contents are as follows:
The current task serial number is allocated to each task according to the sequence of the tasks in the printing task list, the task serial number is increased from 1, and the tasks are allocated in sequence according to the sequence of the tasks in the list;
the current number of prints, the number of prints required for each job, is set, designated by the user when loading the file, and recorded in the job information,
Calculating a zone bit, multiplying the current task number by the current number of printing copies, and taking the remainder of 2, namely, the value of the zone bit is equal to (the current task number multiplied by the current number of printing copies)% 2;
The flag bit is used, the calculated flag bit is assigned to the print task, and each task is assigned with a unique flag bit for identifying the print state of the task.
5.A method of printing a plurality of jobs for different tasks as claimed in claim 1, wherein: according to the positioning data of step S8, the file pointer is pointed to the first line data of the print file to prepare for starting reading the print data, specifically including:
In print control software, a file to be printed is opened by using a file operation function, the opened file is designated by a file path or a file name, a file pointer is moved to a first row data position of the printed file by file pointer operation, the file pointer is moved to the beginning of the file by using a file pointer offset function fseek (), and then file header information is skipped according to a file format and a structure;
And directly reading the first line of data without moving a file pointer, if the file format allows the first line to be directly read, preparing to read the printing data, ensuring that the printing data is read line by using a file reading function after the file pointer is correctly positioned, and selecting a reading mode for reading the text file line by line according to the format and the structure of the file.
6. A method of printing a plurality of jobs for different tasks as claimed in claim 1, wherein: reading the PRN file data line by line according to the read data of the step S9 and the size of each BytesPerLine of each color, preparing to send the PRN file data to the printer device, and setting the byte length BytesPerLine and the color number of each color according to the format of the print file and the requirements of the printer device;
And reading the data of the PRN file according to the rows, traversing each row by circulation until the whole PRN file is read, cutting or analyzing the data of each row according to BytesPerLine of each color to obtain the printing data of each color, converting the data of each color into a corresponding format according to the communication protocol and the data format requirement of the printer equipment, and transmitting the data of each color to the printer equipment.
7. A method of printing a plurality of jobs for different tasks as claimed in claim 1, wherein: the print queue management module is introduced to optimally schedule the print tasks, and the time for task switching is reduced to the greatest extent by reasonably arranging the sequence and the distribution of the print jobs of different tasks, and the method specifically comprises the following steps:
Sequencing the print jobs, sequencing the jobs in the print queue according to the size of the print file and the estimated printing time, and using a First Come First Serve (FCFS) or priority scheduling algorithm to put the jobs with shorter printing time in front, so as to reduce the waiting time of task switching;
The resource allocation, according to the characteristics of the printer and available resources, reasonably allocating tasks to the printer equipment, allocating the jobs which are suitable for simultaneous processing to the printer, and controlling the concurrence number of each job;
Priority scheduling, namely distributing priorities to different printing tasks according to user setting or system requirements;
Dynamically adjusting, namely dynamically adjusting the sequence and allocation of tasks in a printing queue according to the real-time state and the resource utilization condition of a printer, and suspending or rescheduling a certain job when the problem occurs in the printing process or additional processing time is required;
The printing time is estimated, and the completion time of each print job is estimated through analysis of the characteristics of the printer device and the file.
8. A method of printing a plurality of jobs for different tasks as claimed in claim 1, wherein: the print job management module is introduced to realize the management and the monitoring of the print job in the print control software, and the print job management module comprises the following specific steps of
A print job list, in which a current print job list including all print jobs being performed or waiting for execution and information of the jobs is displayed in print control software;
task state monitoring, namely monitoring the state of a printing task in real time, checking the current state of each task, and displaying the residual time and the printed page number information of the task;
Task operation, namely performing operation functions of printing tasks, including task pause, cancel and restart, and performing pause operation or task cancel on the ongoing tasks;
error processing, when an error or abnormality occurs in a print job, capturing and performing corresponding error processing by a print job management module;
and finishing task statistics, recording the number of finished printing tasks, and providing a statistical report.
9. A printing apparatus for multiple jobs for different tasks, characterized by: computer program instructions comprising at least one processor, at least one memory and stored in the memory, which when executed by the processor, implement the method of any of the preceding claims 1-8.
10. A storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of any of the preceding claims 1-8.
CN202410079579.9A 2024-01-19 2024-01-19 Printing method, equipment and storage medium for multiple jobs of different tasks Active CN117908808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410079579.9A CN117908808B (en) 2024-01-19 2024-01-19 Printing method, equipment and storage medium for multiple jobs of different tasks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410079579.9A CN117908808B (en) 2024-01-19 2024-01-19 Printing method, equipment and storage medium for multiple jobs of different tasks

Publications (2)

Publication Number Publication Date
CN117908808A CN117908808A (en) 2024-04-19
CN117908808B true CN117908808B (en) 2024-08-30

Family

ID=90691812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410079579.9A Active CN117908808B (en) 2024-01-19 2024-01-19 Printing method, equipment and storage medium for multiple jobs of different tasks

Country Status (1)

Country Link
CN (1) CN117908808B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118567587B (en) * 2024-05-24 2025-02-18 广州市森扬电子科技有限公司 Method, printing apparatus and storage medium for multi-platen large-scale document printing

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102005008520B4 (en) * 2005-02-24 2011-03-03 OCé PRINTING SYSTEMS GMBH Method, computer program product and printing system for sorting print jobs in such a printing system
JP2009217306A (en) * 2008-03-07 2009-09-24 Seiko Epson Corp Printing system, printer, server, computer program, and print method
JP2018073196A (en) * 2016-10-31 2018-05-10 キヤノン株式会社 Information processing apparatus, control method, and program

Also Published As

Publication number Publication date
CN117908808A (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN117908808B (en) Printing method, equipment and storage medium for multiple jobs of different tasks
CN107885594B (en) Distributed resource scheduling method, scheduling node and access node
US20020101604A1 (en) Method for causing printer system to perform printing, printing method, computer, and printer system
CN102310667B (en) Printing apparatus and control method thereof
US20040122832A1 (en) Location independent backup of data from mobile and stationary computers in wide regions regarding network and server activities
DE69835936T2 (en) Image printing system and split printing method included therein
US7239410B2 (en) Printing system, data processing system and method for confirming job process result
US6967738B1 (en) Network-connectable printer, controller therefor, and method for controlling this controller
US8659771B2 (en) Increasing inkjet printer page yield
CN118034617B (en) Printing method, equipment and storage medium for continuously producing multiple identical jobs
JPS61196326A (en) Priority processing system
US7443529B2 (en) Volume of work estimating for combined processing and unprocessed imaging jobs
EP0994411B1 (en) Network-connectable printer, controller therefor, and control method
JP4652503B2 (en) Status management method, apparatus, and storage medium
JP2000047905A (en) Preventive maintenance system and terminal device connected to the preventive maintenance system
US20040263904A1 (en) Method and apparatus for processing print data
CN120508269B (en) Printing task scheduling method, system and terminal based on main control chip
US20250265026A1 (en) Controlling a printing system using the print queue
CN118963972B (en) A task processing method, processor and storage medium
US20210365871A1 (en) Information processing apparatus and job scheduling method
CN118627029A (en) License verification method and device for cluster operation, storage medium and electronic device
CN120469654A (en) A multi-output printing system
JP3688778B2 (en) Device having a printing mechanism
JPH10283416A (en) On-line document output control system
JPH09218761A (en) Printer server system

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