A bar code label printing method and system

By pre-configuring template files and generating customized templates, the problems of high activation costs for third-party software and the inability to print special-style barcode labels are solved, achieving low-cost and efficient barcode label printing.

CN114193940BActive Publication Date: 2026-04-21SHANGHAI SUOGUANG VISUAL PRODUCTS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI SUOGUANG VISUAL PRODUCTS CO LTD
Filing Date
2021-11-04
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, third-party software activation is expensive and cannot print barcode labels with special designs, resulting in high printing costs and limited applicability.

Method used

Multiple template files are pre-configured, each associated with a printer model. Custom templates are generated by initializing and assigning dynamic variables, allowing special barcode labels to be printed directly on the printer.

Benefits of technology

It reduced printing costs, broadened the applicability of template files, and improved the applicability and production efficiency of barcode label printing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114193940B_ABST
    Figure CN114193940B_ABST
Patent Text Reader

Abstract

This invention provides a barcode label printing method and system. The barcode label printing method includes: Step S1, processing barcode information input externally to obtain general information and customized information, the general information including printer model information; Step S2, matching the corresponding template file according to the printer model information, initializing the template file, and outputting an initialization template; Step S3, obtaining at least one dynamic variable according to the customized information, and processing according to each dynamic variable and the initialization template to obtain a customized template; Step S4, sending the customized template to the corresponding printer to print and generate a barcode label. The beneficial effect is that matching the applicable template file according to the printer model information, and the printer reading the template file to print the barcode label, increases the applicability of the template file and reduces printing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of barcode printing, and more particularly to a barcode label printing method and system. Background Technology

[0002] Currently, barcode labels have broad application prospects in industries such as warehousing, production line automation, books, and commerce. Users can obtain product circulation information by scanning barcode labels, making it easier for them to trace the source of products.

[0003] During the barcode label printing process, the label format and label data used to define the barcode label need to be transmitted using an encoding method that the printer can recognize. Most manufacturers purchase third-party software and use the pre-built template files in the software to control the printer for label printing.

[0004] On the one hand, the activation price of third-party software is relatively high; on the other hand, when manufacturers need to print barcode labels with special designs, there are cases where the third-party software is not configured with special designs, making it unable to print barcode labels with special designs, thus limiting its applicability. Summary of the Invention

[0005] To address the problems existing in the prior art, the present invention provides a barcode label printing method, which pre-configures multiple template files, each template file being associated with the model information of a compatible printer. The barcode label printing method includes:

[0006] Step S1: Process the barcode information input from the outside to obtain general information and customized information. The general information includes the model information corresponding to the printer.

[0007] Step S2: Match the corresponding template file according to the model information, initialize the template file, and output an initialization template;

[0008] Step S3: Obtain at least one dynamic variable based on the customized information, and process the dynamic variable and the initialization template to obtain a customized template;

[0009] Step S4: Send the customized template to the corresponding printer to print and generate a barcode label.

[0010] Preferably, the template file includes an instruction set;

[0011] Then step S2 includes:

[0012] Step S21: Match the corresponding template file according to the model information, and extract the instruction set from the template file;

[0013] Step S22: Initialize each reserved variable contained in the instruction set to obtain an initial instruction set, and output the template file containing the initial instruction set as the initialization template.

[0014] Preferably, in step S3, a customized instruction set is obtained by processing the dynamic variables and the initial instruction set contained in the customized information, and the template file containing the customized instruction set is output as the customized template;

[0015] In step S4, the printer reads and executes the customized instruction set contained in the customized template to print the barcode label.

[0016] Preferably, the instruction set includes at least one control instruction, the control instruction including a command symbol and the reserved variable following the command symbol;

[0017] In step S22, the reserved variables following each command are assigned the value of zero to obtain the initial instruction set.

[0018] Preferably, the customized information includes each of the dynamic variables and the corresponding command information. In step S3, the command corresponding to the control instruction is obtained by matching the command information, and the initial variable corresponding to the command is assigned to the dynamic variable.

[0019] Preferably, if a barcode label to be printed has pre-defined size information, then before performing step S1, the method further includes:

[0020] Step A1: Set up a coordinate system based on the size information;

[0021] Step A2: Define printing content in the coordinate system according to the barcode label to be printed. The printing content includes character information, and each character information has corresponding coordinate information in the coordinate system. Process the coordinate information and the character information to obtain the customized information.

[0022] Preferably, a barcode label printing system applies the barcode label printing method described in any one of the above claims, wherein the barcode label printing system includes:

[0023] The analysis module is used to process barcode information input from the outside to obtain general information and customized information. The general information includes the model information corresponding to the printer.

[0024] The matching module, connected to the analysis module, is used to match the corresponding template file according to the model information, initialize the template file, and output an initialization template.

[0025] A customization module, connected to the matching module, is used to obtain at least one dynamic variable based on the customization information, and to process a customization template based on each dynamic variable and the initialization template.

[0026] The execution module, connected to the customization module, is used to send the customized template to the corresponding printer to print and generate a barcode label.

[0027] Preferably, the template file includes an instruction set;

[0028] The matching module includes:

[0029] The first matching unit is used to match the corresponding template file according to the model information, and extract the instruction set from the template file;

[0030] An initialization unit, connected to the first matching unit, is used to initialize each reserved variable included in the instruction set to obtain an initial instruction set, and output the template file containing the initial instruction set as the initialization template.

[0031] Preferably, if a barcode label to be printed has pre-defined size information, then the barcode label printing system further includes:

[0032] The preprocessing module is used to set a coordinate system based on the size information;

[0033] A definition module, connected to the preprocessing module and the analysis module respectively, is used to define a printable content in the coordinate system based on the barcode label to be printed. The printable content includes character information, and each character information has corresponding coordinate information in the coordinate system. The customized information is obtained by processing the coordinate information and the character information.

[0034] The above technical solution has the following advantages or beneficial effects:

[0035] (1) When printing barcode labels, the template file is initialized based on the barcode information input from the outside and then assigned a value to generate a customized template. When the user needs to print barcode labels with special styles, the printer can be controlled to print special styles by adjusting the customized template. On the one hand, it reduces the need to change different types of printers due to the mismatch between the printer and the template file provided by the third-party software, which provides convenience for manufacturers to print barcode labels and reduces printing costs. On the other hand, it reduces the situation where the barcode label to be printed cannot print special styles because the third-party software has not pre-configured special styles, thus enhancing the applicability of the barcode label printing method.

[0036] (2) When the barcode label to be printed contains a reserved variable that is not configured in the current template file, the manufacturer can add the reserved variable in the template file according to the special style, and assign values ​​to the added reserved variable to obtain a customized template. The printer reads the customized template and performs the printing action, which broadens the scope of application of the template file.

[0037] (3) Assigning dynamic variables to the initial variables in the initial instruction set completes the configuration of the customized template. The configuration method is simple, which improves the configuration efficiency of the customized template and thus improves the production efficiency of barcode labels. Attached Figure Description

[0038] Figure 1 A flowchart of a barcode label printing method is provided in a preferred embodiment of the present invention.

[0039] Figure 2 In a preferred embodiment of the present invention, a detailed flowchart of step S2 in the barcode label printing method is provided.

[0040] Figure 3 In a preferred embodiment of the present invention, the detailed flowchart of steps A1 and A2 before step S1 is executed in the barcode label printing method is shown below.

[0041] Figure 4 This is a control principle diagram of a barcode label printing system in a preferred embodiment of the present invention. Detailed Implementation

[0042] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment; other embodiments that conform to the spirit of the present invention may also fall within the scope of the present invention.

[0043] In a preferred embodiment of the present invention, based on the above-mentioned problems existing in the prior art, a barcode label printing method is provided, which pre-configures multiple template files, each template file being associated with the model information of a suitable printer, such as... Figure 1 As shown, the barcode label printing method includes:

[0044] Step S1: Process the barcode information input from the outside to obtain general information and customized information. The general information includes the printer model information.

[0045] Step S2: Match the corresponding template file according to the model information, initialize the template file, and output an initialization template;

[0046] Step S3: Obtain at least one dynamic variable based on the customized information, and process the dynamic variables and the initialization template to obtain a customized template.

[0047] Step S4: Send the customized template to the corresponding printer to print and generate a barcode label.

[0048] Specifically, in this embodiment, barcode labels are commonly used to identify products. The content of barcode labels varies between different products, and manufacturers need to adjust the content of barcode labels according to their needs.

[0049] Barcode information includes general information and customized information. On the one hand, users need to first determine the type of printer required to print the barcode label and obtain the corresponding printer number, then add the printer number to the general information. On the other hand, users edit the customized information based on the content to be printed on the barcode label.

[0050] In another embodiment, general information and customized information are converted into a barcode consisting of black and white bars according to a preset encoding rule, so that the barcode information input externally is the information contained in the barcode.

[0051] In another embodiment, when printing a barcode label, the barcode is scanned with a barcode scanner to obtain barcode information, and then the barcode information is translated according to encoding rules to obtain general information and customized information.

[0052] Using barcodes as a carrier to store general and customized information reduces the chances of losing access to general and customized information due to communication network failures, which could even affect the manufacturer's printing capacity, thus improving the reliability of information transmission.

[0053] In a preferred embodiment of the present invention, such as Figure 2 As shown, the template file includes a set of instructions;

[0054] Then step S2 includes:

[0055] Step S21: Match the corresponding template file according to the model information, and extract the instruction set from the template file;

[0056] Step S22: Initialize each reserved variable contained in the instruction set to obtain an initial instruction set, and output the template file containing the initial instruction set as the initialization template.

[0057] Specifically, in this embodiment, for each model, there is a preset template file that the printer of that model can recognize and execute printing actions. After the template file is processed by assigning values ​​to dynamic variables, the printer can realize the printing of barcode labels by reading and executing the instruction set after the dynamic variables are assigned values.

[0058] In step S21, the model information contained in the general information is matched with each template file, using the template file as the matching target, to obtain the template file that the printer corresponding to the model information can recognize. This reduces the need for manufacturers to use template files as the standard and replace different models of printers to adapt to the template files, thereby improving printing efficiency and reducing printing costs.

[0059] In a preferred embodiment of the present invention, the instruction set includes at least one control instruction, the control instruction including a command symbol and a reserved variable following the command symbol;

[0060] In step S22, each reserved variable following each command is assigned a value of zero to obtain the initial instruction set.

[0061] Specifically, in this embodiment, step S22 reduces the possibility of discrepancies between the actual printed barcode label and the ideal barcode label due to the reserved variable being a random value, thereby improving the reliability of barcode label printing.

[0062] In a preferred embodiment of the present invention, in step S3, a customized instruction set is obtained by processing the dynamic variables and initial instruction set contained in the customized information, and a template file containing the customized instruction set is output as a customized template.

[0063] In step S4, the printer reads and executes the custom instruction set contained in the custom template to print the barcode label.

[0064] In a preferred embodiment of the present invention, the customization information includes each dynamic variable and the corresponding command information. In step S3, the command corresponding to the control instruction is obtained by matching the command information, and the initial variable corresponding to the command is assigned to the dynamic variable.

[0065] Specifically, in this embodiment, when editing customized information, corresponding dynamic variables are set according to the initial variables that need to be adjusted when the barcode label is actually printed in the printer. Each dynamic variable is associated with a corresponding command code, and the command code information matches the command code corresponding to the initial variable that needs to be adjusted. By replacing the initial variable following the command code with the dynamic variable, the generation efficiency of the customized template is improved, the human error that may be caused by manually assigning values ​​to the initial variables is reduced, and the reliability of the customized template is improved.

[0066] In another embodiment, the printer uses various models of Zebra printers. Since Zebra printers are compatible with the Zebra programming language, the template file is edited using the language rules of the Zebra programming language to improve the compatibility between the template file and the printer.

[0067] In a preferred embodiment of the present invention, a barcode label to be printed has a pre-defined size information. Before executing step S1, if... Figure 3 As shown, it also includes:

[0068] Step A1: Set up a coordinate system based on the dimension information;

[0069] Step A2: Define printing content in the coordinate system based on the barcode label to be printed. The printing content includes each character information. Each character information has corresponding coordinate information in the coordinate system. Custom information is obtained by processing the coordinate information and character information.

[0070] Specifically, the control instructions include instructions for defining the coordinate information and font parameters of each character in the barcode label.

[0071] The font parameters include, but are not limited to: character spacing, character rotation angle, and character size. The coordinate information includes, but is not limited to, the starting position of the character.

[0072] After the printer reads the command, it adjusts the character coordinates and font parameters according to the dynamic variables following the command to meet the customer's customization needs.

[0073] In a preferred embodiment of the present invention, a barcode label printing system is also provided, which applies any of the barcode label printing methods described above, such as... Figure 4 As shown, the barcode label printing system includes:

[0074] Analysis module 1 is used to process barcode information input from the outside to obtain general information and customized information. The general information includes the printer model information.

[0075] Matching module 2, connected to analysis module 1, is used to match the corresponding template file according to the model information, initialize the template file, and output an initialized template;

[0076] Customization module 3, connecting matching module 2, is used to obtain at least one dynamic variable based on customization information, and to process a customized template based on each dynamic variable and the initialization template.

[0077] Execution module 4 connects to customization module 3 and is used to send the customized template to the corresponding printer to print and generate a barcode label.

[0078] In a preferred embodiment of the present invention, the template file includes a set of instructions;

[0079] Matching module 2 includes:

[0080] The first matching unit 21 is used to match the corresponding template file according to the model information, and extract the instruction set from the template file;

[0081] The initialization unit 22 is connected to the first matching unit 21. It is used to initialize each reserved variable contained in the instruction set to obtain an initial instruction set, and output the template file containing the initial instruction set as the initialization template.

[0082] In a preferred embodiment of the present invention, a barcode label to be printed has a pre-defined size information, then the barcode label printing system further includes:

[0083] Preprocessing module 5 is used to set a coordinate system based on the size information;

[0084] The definition module 6 is connected to the preprocessing module 5 and the analysis module 1 respectively. It is used to define a printable content in the coordinate system based on the barcode label to be printed. The printable content includes each character information. Each character information has corresponding coordinate information in the coordinate system. Customized information is obtained by processing the coordinate information and character information.

[0085] In summary, manufacturers can customize barcode labels by adjusting template files, adding reserved variables that need to be configured, and replacing initial variables with dynamic variables. The printer then adjusts the printing content according to the customized instruction set.

[0086] Because the template files use a programming language that printers can read and execute, it reduces the chances of printers being unable to read template files provided by third-party software, thus facilitating the printing of barcode labels for manufacturers and reducing printing costs.

[0087] When printing barcode labels, the template file is initialized based on the externally input barcode information and then assigned values ​​to generate a customized template. When printing barcode labels with special styles, manufacturers can add reserved variables to the template file according to the special styles, and then assign values ​​to the added reserved variables according to the dynamic variables. The printer reads the customized template to print, which broadens the applicability of the template file, reduces the situation where special styles in barcode labels cannot be printed due to the lack of configuration of special styles in third-party software, and enhances the applicability of the barcode label printing method.

[0088] The above description is merely a preferred embodiment of the present invention and does not limit the implementation and protection scope of the present invention. Those skilled in the art should realize that any equivalent substitutions and obvious changes made using the content of this specification and illustrations should be included within the protection scope of the present invention.

Claims

1. A method for printing barcode labels, characterized in that, Multiple template files are pre-configured, each template file being associated with the model information of a compatible printer. The barcode label printing method includes: Step S1: Process the barcode information input from the outside to obtain general information and customized information. The general information includes the model information corresponding to the printer. Step S2: Match the corresponding template file according to the model information, initialize the template file, and output an initialization template; Step S3: Obtain at least one dynamic variable based on the customized information, and process a customized template based on each dynamic variable and the initialization template; Step S4: Send the customized template to the corresponding printer to print and generate a barcode label; The template file includes an instruction set, which includes at least one control instruction, and the control instruction includes a command and a reserved variable following the command. Step S2 includes: Step S21: Match the corresponding template file according to the model information, and extract the instruction set from the template file; Step S22: Initialize each reserved variable contained in the instruction set to obtain an initial instruction set, and output the template file containing the initial instruction set as the initialization template; In step S22, each of the reserved variables following each of the command symbols is assigned a value of zero to obtain the initial instruction set; The customized information includes each of the dynamic variables and the corresponding command information. In step S3, the command corresponding to the control instruction is obtained by matching the command information, and the initial variable corresponding to the command is assigned to the dynamic variable.

2. The barcode label printing method according to claim 1, characterized in that, In step S3, a customized instruction set is obtained by processing the dynamic variables and the initial instruction set contained in the customized information, and the template file containing the customized instruction set is output as the customized template. In step S4, the printer reads and executes the customized instruction set contained in the customized template to print the barcode label.

3. The barcode label printing method according to claim 1, characterized in that, If a barcode label to be printed has a pre-defined size, then before performing step S1, the process further includes: Step A1: Set up a coordinate system based on the size information; Step A2: Define printing content in the coordinate system according to the barcode label to be printed. The printing content includes character information. Each character information has corresponding coordinate information in the coordinate system. Process the coordinate information and the character information to obtain the customized information.

4. A barcode label printing system, characterized in that, The barcode label printing system, using the barcode label printing method as described in any one of claims 1-3, comprises: The analysis module is used to process barcode information input from the outside to obtain general information and customized information. The general information includes the model information corresponding to the printer. The matching module, connected to the analysis module, is used to match the corresponding template file according to the model information, initialize the template file, and output an initialization template. A customization module, connected to the matching module, is used to obtain at least one dynamic variable based on the customization information, and to process a customization template based on each dynamic variable and the initialization template. The execution module, connected to the customization module, is used to send the customized template to the corresponding printer to print and generate a barcode label.

5. The barcode label printing system according to claim 4, characterized in that, The template file includes a set of instructions; The matching module includes: The first matching unit is used to match the corresponding template file according to the model information, and extract the instruction set from the template file; An initialization unit, connected to the first matching unit, is used to initialize each reserved variable included in the instruction set to obtain an initial instruction set, and output the template file containing the initial instruction set as the initialization template.

6. The barcode label printing system according to claim 4, characterized in that, If a barcode label to be printed has a pre-defined size, then the barcode label printing system further includes: The preprocessing module is used to set a coordinate system based on the size information; A definition module, connected to the preprocessing module and the analysis module respectively, is used to define a printable content in the coordinate system based on the barcode label to be printed. The printable content includes character information, and each character information has corresponding coordinate information in the coordinate system. The customized information is obtained by processing the coordinate information and the character information.

Citation Information

Patent Citations

  • Method for realizing bar code printing by utilizing bar code reader to directly control printer

    CN101853405A

  • Method and device for forming printing tasks through automatically matching printing templates

    CN106201364A