Label printing method and device

Through the B/S architecture label printing method, the HTML format is converted into ZPL instructions using a multi-stage conversion engine, which solves the complex user operation and print quality problems in the existing technology, and realizes simple operation without installing software and efficient multi-template printing.

CN120491913AActive Publication Date: 2025-08-15JIANGSU BONSS MEDICAL TECH
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202510350600.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-08-15
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The existing label printing technology is complex in the C/S architecture and has poor autonomy. There are problems such as style misalignment, font missing, and size abnormalities in the B/S architecture, and it cannot meet the needs of printing the same set of label data using multiple templates at the same time.

Method used

The label printing method adopts the B/S architecture, directly creates tag templates on the web page through the browser, and uses a multi-stage conversion engine to convert HTML format to ZPL instructions to ensure printing quality and support multi-template printing.

Benefits of technology

It realizes simple label printing without installing software, avoids problems such as style misalignment and missing fonts, improves user autonomy and printing efficiency, supports multi-template printing, and enhances system compatibility and sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491913A_ABST
    Figure CN120491913A_ABST
Patent Text Reader

Abstract

The invention discloses a label printing method and device, and belongs to the technical field of computer technologies, and the method comprises the steps: receiving a label printing request sent by a browser, and sending a printing setting instruction to the browser; receiving a printing option setting request sent by the browser for at least one printer, and filling the to-be-printed label data into the corresponding printing template to form at least one printing object; the format of the at least one printing object is converted into a format capable of being recognized by a printer, and at least one printing instruction is formed; and sending the at least one printing instruction to the at least one corresponding printer to print at least one piece of label data. According to the method, any software and any plug-in do not need to be installed, the label template is directly manufactured on the webpage through the browser, operation is simple, and during printing, only the printing template needs to be selected, and corresponding data is directly selected for printing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer technology, and in particular relates to a label printing method and device. Background Art

[0002] Label printing is a common practice in corporate production activities. The C / S (client / server) architecture is currently widely used for label printing, which requires the installation of professional software (e.g., Bartender) on the client side. Although this architecture provides a wealth of template designs, user autonomy and flexibility are limited. This is reflected in the complexity of user operations, making it difficult for users without design experience to quickly learn how to operate. Furthermore, each time a label is printed, the label data in the template must be manually modified to the next set of label data to be printed. This is extremely inconvenient for production activities that require printing large quantities of label data.

[0003] Currently, label printing methods utilize a browser / server (B / S) architecture. In this architecture, users access the system using a browser, eliminating the need for client installation and maintenance. Due to its wide applicability, strong interactivity, and high system maintainability, this architecture has gradually become the preferred architecture for enterprise information systems. However, in actual use, printed labels can exhibit issues such as misaligned styles, missing fonts, and unusual sizes. Furthermore, during the production process, the same set of label data may require simultaneous printing using multiple templates, but existing label printing methods cannot meet this requirement. Summary of the Invention

[0004] The purpose of the present invention is to address the above-mentioned deficiencies in the prior art and provide a label printing method and device to solve the problems of style misalignment, font missing, and size abnormality in the existing label printing.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] In a first aspect, a label printing method is provided, which is applied to a server, and the method includes:

[0007] receiving a label printing request sent by a browser, and sending a print setting instruction to the browser, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction;

[0008] receiving a print option setting request for at least one printer sent by the browser, and filling the label data to be printed into a corresponding print template to form at least one print object;

[0009] Converting the format of at least one of the print objects into a format recognizable by the printer to form at least one print instruction;

[0010] Send at least one of the printing instructions to at least one corresponding printer to print out at least one copy of the label data.

[0011] Furthermore, the format of the print object is HTML format, and converting the format of at least one of the print objects into a format recognizable by the printer includes:

[0012] Convert the HTML format of the print object to PDF format;

[0013] Convert PDF print objects into PNG images;

[0014] Binarize the PNG image.

[0015] Convert the binarized PNG image into ZPL instructions.

[0016] Furthermore, each print option setting instruction also includes a print interval setting instruction, a print round setting instruction, and a print count setting instruction, so as to provide the setting functions of the print interval, print round, and print count on the browser respectively.

[0017] Furthermore, after sending at least one of the printing instructions to the corresponding at least one printer to print out at least one copy of the label data, the method further includes:

[0018] Receive printing record information sent by at least one printer, and generate a printing log based on the printing record information.

[0019] Furthermore, the method further comprises:

[0020] In response to receiving the request for saving the print option setting data for at least one printer sent by the browser, the print option setting data for at least one printer is saved.

[0021] In a second aspect, a label printing method is provided, which is applied to a terminal device, and the method includes:

[0022] In response to a label printing action triggered by a user, a label printing request is sent to a server via a browser;

[0023] receiving a print setting instruction sent by the server, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction;

[0024] receiving a print option setting action for at least one printer triggered by a user, wherein the print option setting action at least includes selecting a print template;

[0025] A print option setting request for at least one printer is sent to the server.

[0026] Furthermore, it also includes:

[0027] receiving a user-triggered action of saving print option settings for at least one printer;

[0028] A request for saving print option settings for at least one printer is sent to the server.

[0029] Furthermore, before sending a label printing request to a server via a browser in response to a label printing action triggered by a user, the method further includes:

[0030] Receive user-triggered actions to process tag data and process the tag data, including:

[0031] Add, delete, modify, view, import or export tag data.

[0032] Furthermore, before sending a print option setting request for at least one printer to the server, the method further includes:

[0033] Receive the action of processing the print template triggered by the user and process the print template, including:

[0034] Add, delete, modify, or reset print templates.

[0035] Furthermore, new printing templates are added, including:

[0036] Receive a new printing template action triggered by a user, jump to a template design module, and design a target printing template through the template design module.

[0037] In a third aspect, a label printing device is provided, which is applied to a server, and the device includes:

[0038] a first instruction sending module, configured to receive a label printing request sent by a browser, and send a print setting instruction to the browser, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction;

[0039] a request receiving and print object forming module, configured to receive a print option setting request for at least one printer sent by the browser, and fill the label data to be printed into a corresponding print template to form at least one print object;

[0040] a format conversion module, configured to convert the format of at least one of the print objects into a format recognizable by the printer, thereby forming at least one print instruction;

[0041] The second instruction sending module is used to send at least one printing instruction to at least one corresponding printer to print out at least one label data.

[0042] In a fourth aspect, a label printing device is provided for use in a terminal device, the device comprising:

[0043] A first request sending module is used to send a label printing request to the server through the browser in response to a label printing action triggered by the user;

[0044] a first instruction receiving module, configured to receive a print setting instruction sent by the server, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction;

[0045] a second instruction receiving module, configured to receive a print option setting action for at least one printer triggered by a user, wherein the print option setting action at least includes selecting a print template;

[0046] The second request sending module is configured to send a print option setting request for at least one printer to the server.

[0047] The label printing method and device provided by the present invention have the following beneficial effects:

[0048] 1. The present invention adopts a label printing method with a B / S (browser / server) architecture, which can achieve the goal of making label templates directly on the web page through the browser without installing any software or plug-ins on the computer. The operation is simple. When printing, you only need to select a printing template and directly select the corresponding data to print. In addition, in this system, according to the label template made on the web page (browser), you can set the fields in the label template that need to replace the data. When printing, the label data will be automatically filled in the template according to the corresponding fields. In addition, by setting a multi-stage conversion engine, the template is printed strictly in accordance with the rules adapted to the printer, which can completely avoid the problems of style dislocation, font missing, size abnormality, etc. in the printed labels.

[0049] 2. Whether printing PDF, pictures or documents, the Zebra printer of the present invention will eventually convert them into ZPL instructions and send the data to the printer through the network. Although the existing technology can automatically convert, the results after conversion will have a large deviation. Therefore, the present invention can accurately control the printing range, print quality, printing paper size, etc. by converting ZPL instructions by itself, and there will be no misalignment problem.

[0050] 3. Improved user efficiency: The traditional manual control of print quantity, print interval, and print rounds is switched to automatic control.

[0051] 4. Improved scalability: Supports filling the same set of label data into multiple templates for printing at the same time, which can improve printing efficiency.

[0052] 5. Improved user autonomy: Templates can be designed directly through the web page without relying on Bartender.

[0053] 6. Sharing and Collaboration Enhancement: The system of the present invention enables seamless sharing of printing templates, eliminating the tedious process of repeated design and configuration. Seamless sharing mainly means that once a label template for a product is designed within the UMS system, other personnel can use it after logging into the system, without having to re-import or re-design the template.

[0054] 7. Improved compatibility: No matter what device you use, as long as you can access the web, you can design templates and print labels; you don’t need to install any software or plug-ins to use it. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is a system block diagram of the label printing method of the present invention.

[0056] Figure 2 This is a block diagram of the label printing subsystem of the present invention.

[0057] Figure 3 This is a block diagram of the composition of the server of the present invention.

[0058] Figure 4 The present invention is a flowchart of a label printing method applied to a server.

[0059] Figure 5 The present invention is a flowchart of a label printing method applied to a terminal device. DETAILED DESCRIPTION

[0060] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.

[0061] This embodiment does not require any software or plug-ins and is simple to operate. By setting a multi-stage conversion engine, the template can be printed strictly according to the rules adapted to the printer, which can completely avoid problems such as style misalignment, font missing, and size abnormality in the printed labels.

[0062] refer to Figure 1 This embodiment provides a system architecture applied to a label printing method and apparatus to help those skilled in the art understand the technical content of this specification, but it does not mean that the embodiments of this specification cannot be used in other devices, systems, environments or scenarios.

[0063] refer to Figure 1 , is a schematic diagram of a system architecture provided by the present invention, which specifically includes a terminal device, a printer and a server;

[0064] Among them, terminal equipment;

[0065] The terminal device is used for the user to make label printing selections on the browser and send the label printing selections to the server;

[0066] Specifically, the terminal device of this embodiment can be a fixed device or a mobile terminal device. There is any form of browser on the terminal device. During specific operations, the corresponding label printing selection made by the user on the browser is sent to the server through the network (for example, using the TCP communication protocol). The server runs and returns the corresponding results. The server sends the corresponding printing instructions to the printer through the network, and the printer executes the label printing task.

[0067] In order to facilitate users to make relevant selections and settings for label printing on terminal devices, this embodiment provides a label printing subsystem on the browser.

[0068] As a preferred embodiment of this invention, refer to Figure 2 , the label printing subsystem specifically includes:

[0069] The label management module can create new label data to be printed in strips, and provides buttons such as "Print", "Details", "Modify", "Delete", "Import" and "Export" to realize functions such as data import and export, deletion, modification, and viewing details. During actual printing, printing is performed in the label management module.

[0070] The template management module stores multiple printing templates and provides buttons such as "Add", "Print Settings", "Modify", "Delete", "Search", and "Reset" to achieve corresponding functions; for example, click the "Add" button to jump to the template design module for template design.

[0071] The template design module allows for template design and provides a variety of basic elements required for template design, such as text, images, QR codes, barcodes, customization, lines, etc. Users can use basic elements to design templates by dragging, clicking, editing, and importing in this interface. The module also provides buttons such as paper width and height, paper rotation, zoom in and out, clear, import json, view template json, print preview, and save template to implement corresponding functions. Users can directly click on the template to design a template, or click the "Add" button in the template management module to jump to this module to design a template.

[0072] As a preference of this embodiment, the template design module can be a Hiprint plug-in. Compared with professional label design software, this plug-in provides simple and intuitive label design elements, and can produce templates by simple dragging, clicking, etc., which gives users greater autonomy.

[0073] The print task log module is used to record the current printing information.

[0074] server;

[0075] The server is used to accept label printing selections, run and return the selection results corresponding to the terminal device, and send the printing instructions to the printer;

[0076] refer to Figure 3 ,The server side specifically includes UDI encoding database, printing record database, label database, template design plug-in, asynchronous thread pool and instruction conversion component.

[0077] Among them, the UDI coding database, printing record database, and label database are used to store UDI coding data, printing record data, and label data respectively.

[0078] The template design plug-in is integrated on the server side.

[0079] The asynchronous thread pool is based on its asynchronous task printing queue, instruction cache function, instruction backtracking function, and dynamic setting of printing intervals, rounds, and number of prints to achieve automatic timed printing of label data.

[0080] The instruction conversion component converts the HTML label template into ZPL instructions according to the following process: HTML template -> dynamic data replacement -> PDF file -> PNG image -> image binarization -> image to ZPL instruction;

[0081] The conversion process is as follows: the label template in HTML format is replaced with dynamic data to obtain a PDF file; the PDF file is scaled proportionally to the printing paper to generate a PNG image of the corresponding paper size, the PNG image is binarized, and then converted into ZPL instructions.

[0082] In the prior art, when an HTML template or PDF file is sent to a Zebra printer, the Zebra printer automatically performs format conversion. However, the results of this conversion method can have large deviations, leading to problems such as style dislocation, font missing, and size abnormality. The present invention uses an instruction conversion component to convert the HTML template into ZPL instructions in strict accordance with the ZPL protocol specification, thereby avoiding problems such as printing dislocation.

[0083] The printer is used to receive printing instructions and execute label printing tasks.

[0084] This embodiment uses the UDI code printing of plasma electrodes in the medical device industry as an example to describe the working process:

[0085] Before leaving the factory, the plasma electrode must be affixed with a UDI code on the electrode body, the small box containing the electrode, and the large carton containing a batch of electrodes. This requires that the same UDI code must be matched with three printing templates for printing at the same time. The printing process is as follows:

[0086] On the browser side of the terminal device, click the label management module, find the UDI code data of the plasma electrode, and click print;

[0087] In response to the click action, the server sends print options to the browser, which include print setting options for three printers. Under each printer option are label templates, number of labels to be printed each time, label printing rounds, round intervals, and next print interval options (on the production line, a UDI label is affixed once a batch is produced, so there will be print rounds, round intervals, and next print interval options). The user can choose to use one or more of the three printers in this interface, and select options such as label templates and number of prints at once. After the selection is completed, click "Save Configuration" to store the print setting data in the server. The next time you print, the server can directly call the configuration without the user having to reset it.

[0088] When the user clicks "Confirm Print," the server automatically inserts the UDI code into the user-selected label template. The command conversion component converts the HTML label template into ZPL instructions and sends them to the Zebra printer for printing. The asynchronous thread pool generates a print log for both successful and failed prints. The log contents can be found in the recorded video.

[0089] Among them, before selecting a label template, the user can also click on the template management module to check whether there are any errors or omissions in the label template to be printed. If modification is required, the user can jump to the template design module to modify it, or directly click on the template design module to redesign the template.

[0090] refer to Figure 4 This embodiment provides a label printing method, which is applied to a server and includes the following steps:

[0091] Step S1: receiving a label printing request sent by a browser, and sending a print setting instruction to the browser, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction;

[0092] In this step S1, each print option setting instruction also includes a print interval setting instruction, a print round setting instruction, and a print count setting instruction, so as to provide the setting functions of the print interval, print round, and print count on the browser respectively.

[0093] Step S2: receiving a print option setting request for at least one printer sent by the browser, and filling the label data to be printed into the corresponding print template to form at least one print object.

[0094] Step S3: converting the format of at least one of the print objects into a format recognizable by the printer to form at least one print instruction;

[0095] In this step S3, the format of the print object is HTML format, and converting the format of at least one print object into a format recognizable by the printer includes:

[0096] Convert the HTML format of the print object to PDF format;

[0097] Convert PDF print objects into PNG images;

[0098] Binarize the PNG image.

[0099] Convert the binarized PNG image into ZPL instructions.

[0100] Step S4: sending at least one printing instruction to at least one corresponding printer to print out at least one copy of the label data;

[0101] In this step, after sending at least one printing instruction to at least one corresponding printer to print out at least one copy of label data, the process further includes:

[0102] Receive printing record information sent by at least one printer, and generate a printing log based on the printing record information.

[0103] As a preferred embodiment of this embodiment, the method of this embodiment further includes:

[0104] In response to receiving a request for saving print option settings for at least one printer sent by the browser, print option setting data for at least one printer is saved.

[0105] refer to Figure 5 This embodiment provides a label printing method, which is applied to a terminal device and specifically includes the following steps:

[0106] Step A1: In response to a label printing action triggered by a user, a label printing request is sent to a server via a browser;

[0107] Before this step A1, that is, before sending a label printing request to the server through the browser in response to the label printing action triggered by the user, the method further includes:

[0108] Receive the action of processing tag data triggered by the user and process the tag data. The processing specifically includes:

[0109] Add, delete, modify, view, import or export tag data.

[0110] Step A2: receiving a print setting instruction sent by the server, where the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction;

[0111] In this step A2, each print option setting instruction also includes a print interval setting instruction, a print round setting instruction, and a print count setting instruction, so as to provide the setting functions of the print interval, print round, and print count on the browser.

[0112] Step A3: receiving a print option setting action for at least one printer triggered by a user, where the print option setting action at least includes selecting a print template.

[0113] Step A4: sending a print option setting request for at least one printer to the server;

[0114] This step A4 further includes:

[0115] Receive the action of processing the print template triggered by the user, process the print template, and process the print template, including:

[0116] Add, delete, modify or reset printing templates;

[0117] Preferably, the newly added printing template includes:

[0118] Receive a new printing template action triggered by a user, jump to a template design module, and design a target printing template through the template design module.

[0119] As a preferred embodiment of this invention, the method further includes:

[0120] receiving a user-triggered action of saving print option settings for at least one printer;

[0121] A request for saving print option settings for at least one printer is sent to the server.

[0122] This embodiment further provides a label printing device, which is applied to a server and includes:

[0123] a first instruction sending module, configured to receive a label printing request sent by a browser, and send a print setting instruction to the browser, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction;

[0124] a request receiving and print object forming module, configured to receive a print option setting request for at least one printer sent by the browser, and fill the label data to be printed into a corresponding print template to form at least one print object;

[0125] a format conversion module, configured to convert the format of at least one of the print objects into a format recognizable by the printer, thereby forming at least one print instruction;

[0126] The second instruction sending module is used to send at least one printing instruction to at least one corresponding printer to print out at least one label data.

[0127] Accordingly, this embodiment further provides a label printing device, which is applied to a terminal device and includes:

[0128] A first request sending module is used to send a label printing request to the server through the browser in response to a label printing action triggered by the user;

[0129] a first instruction receiving module, configured to receive a print setting instruction sent by the server, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction;

[0130] a second instruction receiving module, configured to receive a print option setting action for at least one printer triggered by a user, wherein the print option setting action at least includes selecting a print template;

[0131] The second request sending module is configured to send a print option setting request for at least one printer to the server.

[0132] Although the specific embodiments of the invention are described in detail in conjunction with the accompanying drawings, this should not be construed as limiting the scope of protection of this patent. Within the scope described by the claims, various modifications and variations that can be made by those skilled in the art without creative work still fall within the scope of protection of this patent.

Claims

1. A label printing method, characterized in that: Applied to a server, the method includes: receiving a label printing request sent by a browser, and sending a print setting instruction to the browser, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction; receiving a print option setting request for at least one printer sent by the browser, and filling the label data to be printed into a corresponding print template to form at least one print object; Converting the format of at least one of the print objects into a format recognizable by the printer to form at least one print instruction; Send at least one of the printing instructions to at least one corresponding printer to print out at least one copy of the label data.

2. The label printing method according to claim 1, wherein: The format of the print objects is HTML format, and converting the format of at least one of the print objects into a format recognizable by the printer includes: Convert the HTML format of the print object to PDF format; Convert PDF print objects into PNG images; Binarize the PNG image. Convert the binarized PNG image into ZPL instructions.

3. The label printing method according to claim 1, wherein: Each print option setting instruction also includes a print interval setting instruction, a print round setting instruction and a print times setting instruction, so as to provide the setting functions of the print interval, the print round and the print times on the browser respectively.

4. The label printing method according to claim 1, wherein: After sending at least one of the printing instructions to the corresponding at least one printer to print out at least one copy of the label data, the method further includes: Receive printing record information sent by at least one printer, and generate a printing log based on the printing record information.

5. The label printing method according to claim 1, wherein: The method further comprises: In response to receiving the request for saving the print option setting data for at least one printer sent by the browser, the print option setting data for at least one printer is saved.

6. A label printing method, characterized in that: Applied to a terminal device, the method includes: In response to a label printing action triggered by a user, a label printing request is sent to a server via a browser; receiving a print setting instruction sent by the server, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction; receiving a print option setting action for at least one printer triggered by a user, wherein the print option setting action at least includes selecting a print template; A print option setting request for at least one printer is sent to the server.

7. The label printing method according to claim 6, characterized in that: Also includes: receiving a user-triggered action of saving print option settings for at least one printer; A request for saving print option settings for at least one printer is sent to the server.

8. The label printing method according to claim 6, wherein: Before sending a label printing request to a server via a browser in response to a label printing action triggered by a user, the method further includes: Receive user-triggered actions to process tag data and process the tag data, including: Add, delete, modify, view, import or export tag data.

9. The label printing method according to claim 6, wherein: After sending a print option setting request for at least one printer to the server, the method further includes: Receive the action of processing the print template triggered by the user and process the print template, including: Add, delete, modify, or reset print templates.

10. The label printing method according to claim 9, characterized in that: The newly added printing template includes: Receive a new printing template action triggered by a user, jump to a template design module, and design a target printing template through the template design module.

11. A label printing device, characterized in that: Applied to a server, the device includes: a first instruction sending module, configured to receive a label printing request sent by a browser, and send a print setting instruction to the browser, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction; a request receiving and print object forming module, configured to receive a print option setting request for at least one printer sent by the browser, and fill the label data to be printed into a corresponding print template to form at least one print object; a format conversion module, configured to convert the format of at least one of the print objects into a format recognizable by the printer, thereby forming at least one print instruction; The second instruction sending module is used to send at least one printing instruction to at least one corresponding printer to print out at least one label data.

12. A label printing device, characterized in that: Applied to a terminal device, the device includes: A first request sending module is used to send a label printing request to the server through the browser in response to a label printing action triggered by the user; a first instruction receiving module, configured to receive a print setting instruction sent by the server, wherein the print setting instruction includes a print option setting instruction for at least one printer, and each print option setting instruction includes at least a print template selection instruction; a second instruction receiving module, configured to receive a print option setting action for at least one printer triggered by a user, wherein the print option setting action at least includes selecting a print template; The second request sending module is configured to send a print option setting request for at least one printer to the server.

Citation Information

Patent Citations

  • Label printing system

    CN101788892A

  • Label printing processing device, system and method

    CN106814982A

  • Tag printing method and system

    CN108021340A

  • Method and device for printing specified content in browser and computer equipment

    CN110347349A

  • B / S-based label printing system

    CN111142815A