CN114193940A - Bar code label printing method and system - Google Patents

Bar code label printing method and system Download PDF

Info

Publication number
CN114193940A
CN114193940A CN202111302508.3A CN202111302508A CN114193940A CN 114193940 A CN114193940 A CN 114193940A CN 202111302508 A CN202111302508 A CN 202111302508A CN 114193940 A CN114193940 A CN 114193940A
Authority
CN
China
Prior art keywords
information
template
template file
instruction set
bar code
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.)
Pending
Application number
CN202111302508.3A
Other languages
Chinese (zh)
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.)
Shanghai Suoguang Visual Products Co Ltd
Original Assignee
Shanghai Suoguang Visual Products 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 Shanghai Suoguang Visual Products Co Ltd filed Critical Shanghai Suoguang Visual Products Co Ltd
Priority to CN202111302508.3A priority Critical patent/CN114193940A/en
Publication of CN114193940A publication Critical patent/CN114193940A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J3/00Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed
    • B41J3/01Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed for special character, e.g. for Chinese characters or barcodes
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • B41J29/393Devices for controlling or analysing the entire machine ; Controlling or analysing mechanical parameters involving printing of test patterns
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J3/00Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed
    • B41J3/407Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed for marking on special material
    • B41J3/4075Tape printers; Label printers

Abstract

The invention provides a method and a system for printing a bar code label, wherein the method for printing the bar code label comprises the following steps: step S1, processing according to an externally input bar code information to obtain a general information and a customization information, the general information includes the machine type information corresponding to the printer; step S2, obtaining a corresponding template file according to the model information matching, initializing the template file, and outputting an initialized template; step S3, obtaining at least one dynamic variable according to the customization information, and obtaining a customization template according to each dynamic variable and the initialization template; and step S4, sending the customized template to the corresponding printer to print and generate a bar code label. The method has the advantages that the applicable template file is matched according to the model information of the printer, the printer reads the template file to print the bar code label, the application range of the template file is enlarged, and the printing cost is reduced.

Description

Bar code label printing method and system
Technical Field
The invention relates to the technical field of bar code printing, in particular to a method and a system for printing a bar code label.
Background
At present, the bar code label has wide application prospect in the industries of warehouse management, production line automation, books, commerce and the like, and a user can acquire the circulation information of a commodity by scanning the bar code label, so that the user can trace the source of the commodity conveniently.
In the process of printing the barcode label, a label format and label data for defining the barcode label need to be transmitted in a coding mode which can be identified by a printer. Most manufacturers purchase third-party software, and control a printer to print a label by using a template file preset in the third-party software.
On one hand, the activation price of the third-party software is higher; on the other hand, when a manufacturer needs to print a barcode label with a special style, the third-party software is not configured with the special style, so that the barcode label with the special style cannot be printed, and the application range is small.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a barcode label printing method, which is characterized in that a plurality of template files are configured in advance, and each template file is respectively associated with machine type information of an adaptive printer, and the barcode label printing method comprises the following steps:
step S1, processing according to an externally input bar code information to obtain a general information and a customization information, wherein the general information comprises the model information corresponding to the printer;
step S2, obtaining the corresponding template file according to the model information matching, and initializing the template file to output an initialized template;
step S3, obtaining at least one dynamic variable according to the customization information, and processing according to each dynamic variable and the initialization template to obtain a customization template;
and step S4, sending the customized template to the corresponding printer to print and generate a bar code label.
Preferably, the template file includes an instruction set;
the step S2 includes:
step S21, obtaining the corresponding template file according to the model information matching, and extracting the instruction set from the template file;
step S22, initializing each reserved variable included in the instruction set to obtain an initial instruction set, and outputting the template file including the initial instruction set as the initialization template.
Preferably, in step S3, a customized instruction set is obtained by processing according to the dynamic variables and the initial instruction set included in the customization information, and the template file including the customized instruction set is output as the customized template;
in step S4, the printer reads and executes the customized instruction set included in the customized template, and prints the barcode label.
Preferably, the instruction set includes at least one control instruction, the control instruction includes a command symbol and the reserved variable following the command symbol;
then, in step S22, each of the reserved variables following each of the command symbols is assigned to zero, resulting in the initial instruction set.
Preferably, the customized information includes each dynamic variable and corresponding command symbol information, and in step S3, the command symbol corresponding to the control instruction is obtained according to the command symbol information, and the initial variable corresponding to the command symbol is assigned as the dynamic variable.
Preferably, if a barcode label to be printed has preset size information, before executing step S1, the method further includes:
step A1, setting a coordinate system according to the size information;
step A2, defining a printing content in the coordinate system according to the bar code label to be printed, wherein the printing content comprises each character information, each character information has corresponding coordinate information in the coordinate system, and the customized information is obtained by processing according to the coordinate information and the character information.
Preferably, a barcode label printing system is applied to the barcode label printing method described in any one of the above items, and the barcode label printing system includes:
the analysis module is used for processing bar code information input from the outside to obtain general information and customized information, wherein the general information comprises the model information corresponding to the printer;
the matching module is connected with the analysis module and used for obtaining the corresponding template file according to the model information matching, initializing the template file and outputting an initialized template;
the customization module is connected with the matching module and used for acquiring at least one dynamic variable according to the customization information and processing according to each dynamic variable and the initialization template to obtain a customization template;
and the execution module is connected with the customization module and used for sending the customization template to the corresponding printer so as to print and generate a bar code label.
Preferably, the template file includes an instruction set;
the matching module comprises:
the first matching unit is used for obtaining the corresponding template file according to the model information matching and extracting the instruction set from the template file;
and the initialization unit is connected with the first matching unit and used for initializing each reserved variable contained in the instruction set to obtain an initial instruction set and outputting the template file containing the initial instruction set as the initialization template.
Preferably, a barcode label to be printed is preset with a size information, and the barcode label printing system further includes:
the preprocessing module is used for setting a coordinate system according to the size information;
and the definition module is respectively connected with the preprocessing module and the analysis module and is used for defining a printing content in the coordinate system according to the bar code label to be printed, wherein the printing content comprises each character information, each character information has corresponding coordinate information in the coordinate system, and the customized information is obtained by processing according to the coordinate information and the character information.
The technical scheme has the following advantages or beneficial effects:
(1) when the bar code label is printed, the template file is assigned after the template file is initialized according to bar code information input from the outside, a customized template is generated, when a user needs to print the bar code label with a special style, the printer can be controlled to print the special style by adjusting the customized template, on one hand, the situation that the printer of different models needs to be replaced due to the fact that the printer is not matched with the template file provided by third-party software is reduced, convenience is provided for a manufacturer to print the bar code label, the printing cost is reduced, on the other hand, the situation that the special style in the bar code label cannot be printed due to the fact that the third-party software is not pre-configured with the special style due to the fact that the bar code label to be printed is provided with the special style is reduced, and the applicability of the bar code label printing method is enhanced;
(2) when the bar code label to be printed contains the reserved variable which is not configured in the current template file, a manufacturer can add the reserved variable in the template file according to a special style, and assign the added reserved variable to obtain a customized template, and a printer reads the customized template and executes printing action, so that the application range of the template file is widened;
(3) and the configuration of the customized template can be completed by assigning the dynamic variable to the initial variable in the initial instruction set, the configuration method is simple, the configuration efficiency of the customized template is improved, and the production efficiency of the bar code label is further improved.
Drawings
FIG. 1 is a flow chart of a method for printing a barcode label according to a preferred embodiment of the present invention;
FIG. 2 is a flowchart illustrating the detailed procedure of step S2 in the barcode label printing method according to the preferred embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps A1 and A2 of the barcode label printing method before step S1;
FIG. 4 is a schematic diagram of a barcode label printing system according to a preferred embodiment of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present invention is not limited to the embodiment, and other embodiments may be included in the scope of the present invention as long as the gist of the present invention is satisfied.
In a preferred embodiment of the present invention, based on the above problems in the prior art, there is provided a barcode label printing method, in which a plurality of template files are configured in advance, and each template file is associated with machine type information of an adaptive printer, as shown in fig. 1, the barcode label printing method includes:
step S1, processing according to an externally input bar code information to obtain a general information and a customization information, the general information includes the machine type information corresponding to the printer;
step S2, obtaining a corresponding template file according to the model information matching, initializing the template file, and outputting an initialized template;
step S3, obtaining at least one dynamic variable according to the customization information, and obtaining a customization template according to each dynamic variable and the initialization template;
and step S4, sending the customized template to the corresponding printer to print and generate a bar code label.
Specifically, in this embodiment, the barcode label is commonly used for identifying the commodity, and there is a difference between the contents of the barcode labels of different commodity demands, and the manufacturer needs to adjust the contents of the barcode labels according to the demands.
On one hand, a user needs to firstly judge the type of a printer required for printing the bar code label and obtain a corresponding printer number, and adds the printer number into the general information; on the other hand, the user edits the customized information according to the content to be printed in the barcode label.
In another embodiment, the general information and the customized information are converted into a bar code consisting of black bars and white bars according to a preset encoding rule, and the bar code information input externally is information contained in the bar code.
In another embodiment, when the barcode label is printed, the barcode is scanned by a barcode scanning gun to obtain barcode information, and the barcode information is translated by the encoding rule to obtain the general information and the customized information.
The bar code is used as a carrier to store the general information and the customized information, so that the probability that the general information and the customized information cannot be obtained due to the fault of a communication network, and even the printing capacity of a manufacturer is influenced is reduced, and the reliability of information transmission is improved.
In a preferred embodiment of the present invention, as shown in FIG. 2, the template file includes an instruction set;
step S2 includes:
step S21, obtaining a corresponding template file according to the model information matching, and extracting an instruction set from the template file;
step S22, initializing each reserved variable included in the instruction set to obtain an initial instruction set, and outputting a template file including the initial instruction set as an initialization template.
Specifically, in this embodiment, for each model, a template file that can identify and execute a printing action is preset in the printer of the model, and after the template file is subjected to assignment processing of a dynamic variable, the printer can print the barcode label by reading and executing an instruction set to which the dynamic variable is assigned.
In step S21, the template file is used as a matching target, and the model information included in the general information is matched with each template file, so as to obtain the template file that can be identified by the printer corresponding to the model information, thereby reducing the need for manufacturers to replace printers of different models to adapt to the template file, improving the printing efficiency, and reducing the printing cost.
In a preferred embodiment of the present invention, the instruction set includes at least one control instruction, the control instruction includes a command symbol and a reserved variable following the command symbol;
then in step S22, the reserved variables following the commanders are assigned to zero, resulting in an initial instruction set.
Specifically, in this embodiment, in step S22, the situation that the actual printed barcode label is deviated from the ideal barcode label due to the fact that the reserved variable is a random value is reduced, and the reliability of barcode label printing is improved.
In the preferred embodiment of the present invention, in step S3, a customized instruction set is obtained by processing according to the dynamic variables and the initial instruction set included in the customized information, and the template file including the customized instruction set is output as the customized template;
then in step S4, the printer reads and executes the custom instruction set contained in the custom template, and prints out the barcode label.
In a preferred embodiment of the present invention, the customization information includes each dynamic variable and corresponding command symbol information, and in step S3, the corresponding command symbol in the control instruction is obtained according to the command symbol information matching, and the initial variable corresponding to the command symbol is assigned as the dynamic variable.
Specifically, in the present embodiment, when editing the customization information, the corresponding dynamic variable is set according to the initial variable that needs to be adjusted when the printer actually prints the barcode label. And each dynamic variable is respectively associated with corresponding command symbol information, the command symbol information is matched with the command symbol corresponding to the initial variable to be adjusted, the dynamic variable replaces the initial variable followed by the command symbol, the generation efficiency of the customized template is improved, the artificial error possibly caused by manually assigning the initial variable is reduced, and the reliability of the customized template is improved.
In another embodiment, the printer is of each type of zebra printer, and the zebra printer is suitable for the zebra programming language, so that the template file is edited by applying the language rules of the zebra programming language, and the adaptability between the template file and the printer is improved.
In a preferred embodiment of the present invention, before the step S1, if a barcode label to be printed has a preset size information, as shown in fig. 3, the method further includes:
step A1, setting a coordinate system according to the size information;
step A2, defining a printing content in the coordinate system according to the bar code label to be printed, wherein the printing content comprises each character information, and each character information has corresponding coordinate information in the coordinate system, and the customized information is obtained according to the coordinate information and the character information processing.
Specifically, the control instructions include instructions for defining coordinate information and font parameters for individual characters in the barcode label.
Font parameters include, but are not limited to: character spacing, character rotation angle, character size, and coordinate information including, but not limited to, the starting position of the character.
After the printer reads the command symbol, the coordinate information and font parameters of the character are adjusted according to the dynamic variable following the command symbol, so as to meet the customization requirements of customers.
In a preferred embodiment of the present invention, there is further provided a barcode label printing system, which applies the barcode label printing method as described above, and as shown in fig. 4, the barcode label printing system includes:
the analysis module 1 is used for processing bar code information input from the outside to obtain general information and customized information, wherein the general information comprises machine type information corresponding to the printer;
the matching module 2 is connected with the analysis module 1 and used for obtaining a corresponding template file according to the model information matching, initializing the template file and outputting an initialized template;
the customizing module 3 is connected with the matching module 2 and used for acquiring at least one dynamic variable according to the customizing information and processing according to each dynamic variable and the initialization template to obtain a customizing template;
and the execution module 4 is connected with the customization module 3 and is used for sending the customization template to a corresponding printer so as to print and generate a bar code label.
In a preferred embodiment of the present invention, the template file includes an instruction set;
the matching module 2 comprises:
the first matching unit 21 is configured to obtain a corresponding template file according to the model information matching, and extract an instruction set from the template file;
the initialization unit 22 is connected to the first matching unit 21, and configured to perform initialization processing on each reserved variable included in the instruction set to obtain an initial instruction set, and output a template file including the initial instruction set as an initialization template.
In a preferred embodiment of the present invention, if a barcode label to be printed has a preset size information, the barcode label printing system further includes:
the preprocessing module 5 is used for setting a coordinate system according to the size information;
and the definition module 6 is respectively connected with the preprocessing module 5 and the analysis module 1 and is used for defining a printing content in the coordinate system according to the bar code label to be printed, wherein the printing content comprises each character information, and each character information has corresponding coordinate information in the coordinate system and is processed according to the coordinate information and the character information to obtain the customized information.
In conclusion, a manufacturer replaces an initial variable with a dynamic variable by adjusting a template file and adding a reserved variable to be configured into the template file, and a printer adjusts printing contents according to a customized instruction set to realize the customization of the barcode label.
Because the template file adopts the programming language which can be read and executed by the printer, the condition that the template file provided by the third-party software cannot be read by the printer is reduced, convenience is provided for manufacturers to print bar code labels, and the printing cost is reduced.
When the bar code label is printed, the template file is assigned after the template file is initialized according to bar code information input from the outside, a customized template is generated, when the bar code label with a special style needs to be printed, a manufacturer can add a reserved variable in the template file according to the special style, then the assigned reserved variable is assigned according to a dynamic variable, and a printer reads the customized template for printing, so that the application range of the template file is widened, the condition that the special style in the bar code label cannot be printed because a third-party software is not configured with the special style is reduced, and the applicability of the bar code label printing method is enhanced.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.

Claims (9)

1. A barcode label printing method is characterized in that a plurality of template files are configured in advance, and each template file is associated with machine type information of an adaptive printer, and the barcode label printing method comprises the following steps:
step S1, processing according to an externally input bar code information to obtain a general information and a customization information, wherein the general information comprises the model information corresponding to the printer;
step S2, obtaining the corresponding template file according to the model information matching, and initializing the template file to output an initialized template;
step S3, obtaining at least one dynamic variable according to the customization information, and processing according to each dynamic variable and the initialization template to obtain a customization template;
and step S4, sending the customized template to the corresponding printer to print and generate a bar code label.
2. The method of claim 1, wherein the template file includes a set of instructions;
the step S2 includes:
step S21, obtaining the corresponding template file according to the model information matching, and extracting the instruction set from the template file;
step S22, initializing each reserved variable included in the instruction set to obtain an initial instruction set, and outputting the template file including the initial instruction set as the initialization template.
3. The method for printing a barcode label according to claim 2, wherein in step S3, a customized instruction set is obtained by processing according to the dynamic variables and the initial instruction set included in the customization information, and the template file including the customized instruction set is output as the customized template;
in step S4, the printer reads and executes the customized instruction set included in the customized template, and prints the barcode label.
4. The method of claim 2, wherein the instruction set includes at least one control instruction, the control instruction including a command symbol and the reserved variable following the command symbol;
then, in step S22, each of the reserved variables following each of the command symbols is assigned to zero, resulting in the initial instruction set.
5. The method for printing barcode labels of claim 4, wherein the customized information includes each dynamic variable and corresponding command symbol information, and in step S3, the corresponding command symbol in the control command is obtained according to the command symbol information matching, and the initial variable corresponding to the command symbol is assigned as the dynamic variable.
6. The method for printing barcode labels of claim 1, wherein if a barcode label to be printed is preset with a size information, before performing step S1, the method further comprises:
step A1, setting a coordinate system according to the size information;
step A2, defining a printing content in the coordinate system according to the bar code label to be printed, wherein the printing content comprises each character information, each character information has corresponding coordinate information in the coordinate system, and the customized information is obtained by processing according to the coordinate information and the character information.
7. A barcode label printing system to which the barcode label printing method according to any one of claims 1 to 6 is applied, the barcode label printing system comprising:
the analysis module is used for processing bar code information input from the outside to obtain general information and customized information, wherein the general information comprises the model information corresponding to the printer;
the matching module is connected with the analysis module and used for obtaining the corresponding template file according to the model information matching, initializing the template file and outputting an initialized template;
the customization module is connected with the matching module and used for acquiring at least one dynamic variable according to the customization information and processing according to each dynamic variable and the initialization template to obtain a customization template;
and the execution module is connected with the customization module and used for sending the customization template to the corresponding printer so as to print and generate a bar code label.
8. The system of claim 7, wherein the template file includes a set of instructions;
the matching module comprises:
the first matching unit is used for obtaining the corresponding template file according to the model information matching and extracting the instruction set from the template file;
and the initialization unit is connected with the first matching unit and used for initializing each reserved variable contained in the instruction set to obtain an initial instruction set and outputting the template file containing the initial instruction set as the initialization template.
9. The system of claim 7, wherein if a barcode label to be printed has a predetermined size information, the system further comprises:
the preprocessing module is used for setting a coordinate system according to the size information;
and the definition module is respectively connected with the preprocessing module and the analysis module and is used for defining a printing content in the coordinate system according to the bar code label to be printed, wherein the printing content comprises each character information, each character information has corresponding coordinate information in the coordinate system, and the customized information is obtained by processing according to the coordinate information and the character information.
CN202111302508.3A 2021-11-04 2021-11-04 Bar code label printing method and system Pending CN114193940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111302508.3A CN114193940A (en) 2021-11-04 2021-11-04 Bar code label printing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111302508.3A CN114193940A (en) 2021-11-04 2021-11-04 Bar code label printing method and system

Publications (1)

Publication Number Publication Date
CN114193940A true CN114193940A (en) 2022-03-18

Family

ID=80647006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111302508.3A Pending CN114193940A (en) 2021-11-04 2021-11-04 Bar code label printing method and system

Country Status (1)

Country Link
CN (1) CN114193940A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116070667A (en) * 2023-03-07 2023-05-05 机科发展科技股份有限公司 System and method for generating label assembly for information tracing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116070667A (en) * 2023-03-07 2023-05-05 机科发展科技股份有限公司 System and method for generating label assembly for information tracing

Similar Documents

Publication Publication Date Title
US8694882B2 (en) Control device, method of controlling a recording device, and a storage medium
US9110615B2 (en) Point of sale control device, control method, and storage medium storing a program for a point of sale device
US6776342B1 (en) Process for the parameterization of scanners for one-dimensional or two-dimensional printed codes
CN114193940A (en) Bar code label printing method and system
US20110043836A1 (en) Printing control device, printer driver, conversion device, printer, printing system, control method for a printing control device, and control method for a printer
CN101180631A (en) Print medium feature encoding and decoding
CN110488738B (en) Code generation method and device
CN112948902B (en) Asset information confirmation method, system and medium
CN108891130B (en) Bar code printing system
CN111325012B (en) word report generation method and system
US9111198B2 (en) Print control method, print control device, and storage medium
CN112477443B (en) Bar code label printing method and system
JPH11221946A (en) Print system and method
US20050077354A1 (en) Barcode optical character recognition
US20030174135A1 (en) System and method for utilizing multiple fonts
CN107885504B (en) Heterogeneous multi-platform system control logic consistency checking method
US8817285B2 (en) Method and apparatus for printing HTML content
US20040111712A1 (en) Method and device for porting software programs to a target platform by way of an electronic data processing system
CN114881612A (en) Method, device, equipment and medium for realizing integrated printing and writing of engineering data
CN112506453A (en) Method, device, processor and non-volatile storage medium for printing nameplate
CN117350249B (en) Control configuration method and system for automatically inputting electronic document data
CN112486428A (en) Printing method, printing device and storage medium
CN107728965B (en) Method and system for automatically printing Chinese characters by bar code printer
JP2017087690A (en) Printer, printer system, printer control method, and program
CN112732208A (en) Label management method and system, computer readable storage medium and control device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication