Background
With the rapid increase of various documents in the warehouse in geometric multiples, the printing of large-data-volume labels of each document becomes an urgent requirement for warehouse operation. The present invention provides an efficient solution to this background need.
The document label printing scheme used in the warehouse at present mainly realizes the printing of document labels through a browser or a word document or a template provided by a third-party report design tool.
In the scheme of printing the label by using the browser, a user needs to set a label printing format in the browser, and the printing formats of different labels may be different. Thus, when a user prints a large number of labels at a time, corresponding print format parameters need to be set in the browser according to the format requirements of each label to be printed. In addition, the current browser usually does not provide a printing mode without preview, that is, each time printing is performed, the user needs to participate in confirmation, so that the printing efficiency is seriously affected in a scene that a large number of labels need to be printed.
In the scheme of printing the label by using the word document, the system stores the label in a word document mode, and when a user needs to print the label, all label files needing to be printed are downloaded from the system firstly, and then the files are printed. In the scheme, the label file needs to be downloaded, so that the printing efficiency is influenced by the network transmission rate, and particularly when a large number of labels need to be printed at one time, the network downloading speed is low, and the printing efficiency is seriously reduced.
In the scheme of printing the label by using the report design tool of the third party, for each label to be printed by the user, the document data corresponding to the label needs to be filled into the label template designed by using the report design tool, and then the printer is called to print the label. That is, in this scheme, the printer is called once every time a label is printed, and thus, when a large number of labels need to be printed, the printer needs to be called in a large number, thereby causing a problem of low printing efficiency. In addition, the report design tool of the third party may have the requirement of being incapable of supporting the printing formats of all the labels, so that the label printing requirement of the user cannot be met.
Therefore, when a large number of labels are printed, the existing label printing scheme has the problem that the printing efficiency is low or even the printing format requirements of all the labels cannot be met. Therefore, the conventional label printing scheme is not suitable for printing of a large number of labels.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a label printing method and system, which can improve the printing efficiency of a large number of labels and is suitable for printing a large number of labels.
In order to achieve the purpose, the technical scheme provided by the invention is as follows:
a label printing method comprising:
the label printing server acquires label content data corresponding to a label to be printed according to a list of the label to be printed currently submitted by a user, and sends the label content data to terminal equipment of the user;
the terminal equipment groups the label content data according to the label type; for each group of label content data, acquiring a label template corresponding to the type of the label preset in the terminal, respectively filling the group of label content data into the label templates to obtain all labels corresponding to the group of label content data, and storing the labels in a label document to obtain a label document corresponding to the group of label content data;
and the terminal equipment sends all the label documents to a printer for printing.
A label printing system includes a label printing server, a terminal device, and a printer,
the label printing server is used for acquiring label content data corresponding to a label to be printed according to a list of the label to be printed currently submitted by a user and sending the label content data to the terminal equipment of the user;
the terminal equipment is used for grouping the label content data according to the label type; for each group of label content data, acquiring a label template corresponding to the type of the label preset in the terminal, respectively filling the group of label content data into the label templates to obtain all labels corresponding to the group of label content data, and storing the labels in a label document to obtain a label document corresponding to the group of label content data; and sending all the label documents to a printer for printing.
In summary, according to the label printing method and system provided by the present invention, the label printing server only needs to send the label content data corresponding to the label to be printed by the user to the terminal device, and the terminal device generates the corresponding label document based on the data by using the preset label templates of various labels, so that the data transmission amount in the network can be reduced, and the large printing delay caused by network transmission can be avoided. In addition, after the user submits the list of the labels to be printed, the user does not need to participate, and the dependence of the traditional printing method on the user operation is avoided. Therefore, the invention can improve the printing efficiency of a large-scale number of labels and is suitable for the rapid printing of the large-scale number of labels.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The core idea of the invention is as follows: the system only sends the service data contained in the label to be printed to the user terminal equipment, and the user terminal generates and prints corresponding documents in a unified way according to the received data and the corresponding label template. Therefore, a user only needs to select a label to be printed from the system, and then does not need to participate in the subsequent printing process, and the system only needs to transmit data (namely label data) in the label to the user terminal, and does not need to transmit the whole file containing the label typesetting format, so that the data volume of network transmission can be greatly reduced, the time overhead of the whole printing process can be greatly improved, and the printing efficiency of a large-scale number of labels can be effectively improved.
Fig. 1 is a schematic flow diagram of a method according to an embodiment of the present invention, and as shown in fig. 1, a label printing method implemented by the embodiment mainly includes:
step 101, a label printing server obtains label content data corresponding to a label to be printed according to a list of the label to be printed currently submitted by a user, and sends the label content data to a terminal device of the user.
In this step, when the user needs to print the label, the user only needs to submit the list of the label to be printed to the print server through the terminal device, and the print server obtains the corresponding label content data from the database according to the list and then sends the label content data to the user terminal device. Therefore, the printing server does not need to transmit the whole file containing the label typesetting format to the terminal equipment, but only transmits the related content data to the terminal equipment, so that the influence of the network transmission speed on the printing process can be avoided, the time overhead of the whole printing process is greatly reduced, and the printing efficiency of a large-scale quantity of labels is effectively improved.
In practical application, the label printing server may obtain a list of labels to be printed of the user in various manners (such as a manner of sending a message or a web page), for example, the label printing server may send a label name sheet printable by a current application system to the user terminal device when receiving a label printing request of the user, and the terminal device sends a label to be printed selected by the user according to the list of labels to the server in a manner of message. Preferably, for the convenience of user operation, the following method may be adopted to submit the list of labels to be printed:
the user accesses a printing label selection webpage of the label printing server through a browser on the terminal equipment, selects a label to be printed on the printing label selection webpage, and displays a list of labels printable by a current application system on the printing label selection webpage; and the terminal equipment sends the selected label to the label printing server.
Preferably, in order to improve the printing efficiency, a special server (i.e. a data loading server in the following method) may be used to obtain the label content data corresponding to the print label from the database, and specifically, the following method may be used to obtain the label content data corresponding to the label to be printed:
the label printing server sends the document number of the label to be printed to a data loading server; and the data loading server acquires the label content data of the label corresponding to the document number from a database and sends the label content data to the label printing server.
In practical application, a http request listener communication mode or a socket communication mode may be adopted between the browser and the terminal device.
In a specific implementation, the tag content data may be in a Json format.
102, the terminal equipment groups the label content data according to the label type; and for each group of label content data, acquiring a label template corresponding to the type of the label preset in the terminal, respectively filling the group of label content data into the label template to obtain all labels corresponding to the group of label content data, and storing the labels in a label document to obtain the label document corresponding to the group of label content data.
In this step, after receiving the label content data corresponding to the label to be printed, which is fed back by the label printing server, the terminal device needs to group the label content data according to the label type, so that the label content data corresponding to the same type of label is in the same group, and then the label templates configured for each type of label in advance are used to fill each group of label content data into the corresponding label templates, so as to generate corresponding label documents. Therefore, when the label printing is carried out, for all the labels to be printed in the same class, the printing of all the labels to be printed in the class can be finished only by printing one label document. Therefore, the printing efficiency of the large-scale quantity of labels can be effectively improved, so that the invention is suitable for printing the large-scale quantity of labels.
In addition, the label template comprises the printing format setting of the corresponding document, so that when the label document generated based on the label template is printed, the setting of printing parameters is not required to be independently carried out, the batch printing of a plurality of label documents can be realized, and the printing efficiency of a large-scale number of labels can be improved.
Preferably, the tag templates and the tag documents are in a PDF format or an HTML format, and the configuration of each type of tag template is known by those skilled in the art, which is not described herein again.
The editing tools such as PDF or HTML can set the label templates corresponding to various labels, so that the problem that the traditional printing scheme cannot meet the requirements of users due to the fact that the traditional printing scheme is limited by report design tools of third parties can be solved.
And 103, sending all the label documents to a printer for printing by the terminal equipment.
Fig. 2 is a schematic diagram of a label printing system corresponding to the above method, as shown in fig. 2, the system includes a label printing server, a terminal device and a printer, wherein,
the label printing server is used for acquiring label content data corresponding to a label to be printed according to a list of the label to be printed currently submitted by a user and sending the label content data to the terminal equipment of the user;
the terminal equipment is used for grouping the label content data according to the label type; for each group of label content data, acquiring a label template corresponding to the type of the label preset in the terminal, respectively filling the group of label content data into the label templates to obtain all labels corresponding to the group of label content data, and storing the labels in a label document to obtain a label document corresponding to the group of label content data; and sending all the label documents to a printer for printing.
Preferably, the terminal device is configured to send the label selected by the user to the label printing server; the selecting comprises: and the user accesses a printing label selection webpage of the label printing server through a browser on the terminal equipment, selects a label to be printed on the printing label selection webpage, and displays a list of labels printable by the current application system on the printing label selection webpage.
Preferably, the system further comprises a data loading server;
the label printing server is used for sending the document number of the label to be printed to a data loading server;
and the data loading server is used for acquiring the label content data of the label corresponding to the document number from a database and sending the label content data to the label printing server.
Preferably, the tag template and the tag document are in a PDF format or an HTML format.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.