CN107728965B - Method and system for automatically printing Chinese characters by bar code printer - Google Patents

Method and system for automatically printing Chinese characters by bar code printer Download PDF

Info

Publication number
CN107728965B
CN107728965B CN201710992087.9A CN201710992087A CN107728965B CN 107728965 B CN107728965 B CN 107728965B CN 201710992087 A CN201710992087 A CN 201710992087A CN 107728965 B CN107728965 B CN 107728965B
Authority
CN
China
Prior art keywords
chinese characters
zplii
language
graphic array
product
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710992087.9A
Other languages
Chinese (zh)
Other versions
CN107728965A (en
Inventor
张义
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha Yiqi Information Technology Co.,Ltd.
Original Assignee
Taizhou Jiji Intellectual Property Operation 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 Taizhou Jiji Intellectual Property Operation Co ltd filed Critical Taizhou Jiji Intellectual Property Operation Co ltd
Priority to CN201710992087.9A priority Critical patent/CN107728965B/en
Publication of CN107728965A publication Critical patent/CN107728965A/en
Application granted granted Critical
Publication of CN107728965B publication Critical patent/CN107728965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1205Improving or facilitating administration, e.g. print management resulting in increased flexibility in print job configuration, e.g. job settings, print requirements, job tickets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1229Printer resources management or printer maintenance, e.g. device status, power levels
    • G06F3/1232Transmitting printer device capabilities, e.g. upon request or periodically
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1244Job translation or job parsing, e.g. page banding
    • G06F3/1245Job translation or job parsing, e.g. page banding by conversion to intermediate or common format

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

The invention discloses a method for automatically printing Chinese characters by a bar code printer, which comprises the following steps: acquiring color characteristics of a product, and acquiring Chinese characters corresponding to the color characteristics according to the color characteristics; inquiring codes corresponding to the Chinese characters in a preset word stock, wherein the word stock is assembled by languages recognizable by a target printer; the codes are output to the target printer, so that the problem that only fixed Chinese character bar codes can be printed in the prior art is solved, the color characteristics of a product are dynamically identified, corresponding Chinese characters are independently selected according to the color of the product, and the corresponding Chinese character bar codes are automatically printed; brings convenience to users and improves the efficiency of products.

Description

Method and system for automatically printing Chinese characters by bar code printer
Technical Field
The invention belongs to the technical field of printing, and particularly relates to a method and a system for automatically printing Chinese characters by a bar code printer.
Background
The zebra printer provides a solution for industrial barcode printing and is widely applied to industrial production. The application scenarios are very many, such as printing the unique serial number of the product (for example, SN: 01234567890), and realizing dynamic printing by using a zebra printer. The operating principle of the zebra printer is that real-time data is converted into ZPLII language by printing software and is dynamically sent to the printer, and then the printer completes the printing work. These data, which are usually composed of numbers or letters, can be directly printed out because the numbers and letters marked in the zpli language are directly recognizable by the printer.
However, if the Chinese barcode needs to be printed, the Chinese code cannot be directly sent to the printer because ZPLII language does not "know" Chinese. The technical scheme for solving the problem is that the object is coded by a ZPLII language, and in the ZPLII language, the object can be coded according to characters or graphic arrays. In the prior art, the printing of the Chinese barcode generally utilizes a barcode editing tool to convert Chinese into a graphic array code according to the characteristics of a picture, then the coded data is sent to printing software, and the printing software sends the data to a printer. However, the bar code editing tool converts the Chinese characters into the graphic array codes according to the picture characteristics by manual operation, so that the printed Chinese characters are fixed. The scheme has the disadvantages that only fixed Chinese can be printed, for example, two characters of black are printed, the black can be prepared in advance in a picture mode during design, the black can be printed only each time, if a batch of products have both black and white, the two characters of white cannot be directly printed, and the black can be replaced by the corresponding code of white manually. This approach is difficult to apply to a batch of multi-color product lines because of the constant manual switching required.
Therefore, how to solve the problems in the prior art, dynamically identify the color characteristics of the product, and automatically print the corresponding Chinese character bar code becomes a problem to be solved urgently.
Disclosure of Invention
In view of this, the present invention provides a method and a system for automatically printing Chinese characters by a barcode printer, which achieve dynamic identification of color identifiers of products and automatically print corresponding barcodes of Chinese characters according to the color identifiers.
According to the above object, the present invention provides a method for automatically printing Chinese characters by a barcode printer, the method comprising:
s1, obtaining color characteristics of a product, and obtaining Chinese characters corresponding to the color characteristics according to the color characteristics;
s2, searching the codes corresponding to the Chinese characters in a preset word stock, wherein the word stock is assembled by languages recognizable by a target printer;
s3, outputting the code to the target printer.
Preferably, step S1 specifically includes:
establishing a characteristic table, wherein the characteristic table stores the corresponding relation between the color characteristics of the product and the Chinese characters;
acquiring RGB values of a product image, and acquiring color characteristics corresponding to the product according to the RGB values;
and acquiring the Chinese characters corresponding to the color features according to the color features and a storage table.
Preferably, the setting of the preset word stock specifically includes:
and converting preset Chinese characters into ZPLII language graphic array codes through a bar code editing tool, and storing the corresponding relation between the Chinese characters and the converted ZPLII language graphic array codes.
Preferably, step S2 specifically includes:
acquiring ZPLII language graphic array codes corresponding to Chinese characters in the word stock;
and generating coded data conforming to the ZPLII language format, wherein the coded data comprises ZPLII language graphic array codes corresponding to the Chinese characters.
Preferably, step S3 specifically includes:
and the target printer acquires the coded data, identifies the ZPLII language graphic array code corresponding to the Chinese characters and prints the Chinese characters.
Preferably, step S2 further includes:
manufacturing a basic script template by using a ZPLII language, and setting a characteristic variable in the basic script template;
and acquiring ZPLII language graphic array codes corresponding to Chinese characters in the character library, and replacing the characteristic variables with the ZPLII language graphic array codes corresponding to the Chinese characters.
According to the above object, the present invention provides an automatic Chinese character printing system of a barcode printer, the system comprising:
the image module is used for acquiring the color characteristics of a product and acquiring Chinese characters corresponding to the color characteristics according to the color characteristics;
the query module is used for querying the code corresponding to the Chinese character in a preset word stock, and the word stock is assembled by a language which can be recognized by a target printer;
an output module to output the code to the target printer.
Preferably, the image module specifically includes:
the characteristic storage unit is used for establishing a characteristic table which stores the corresponding relation between the color characteristics of the product and the Chinese characters;
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring an RGB value of a product image and judging a color characteristic corresponding to the product according to the RGB value;
and the query unit is used for querying the corresponding Chinese characters in the characteristic table according to the color characteristics.
Preferably, the query module specifically includes:
the word stock unit is used for converting preset Chinese characters into ZPLII language graphic array codes through a bar code editing tool and storing the corresponding relation between the Chinese characters and the converted ZPLII language graphic array codes;
the searching unit is used for searching the ZPLII language graphic array code corresponding to the Chinese character in the character library unit;
and the coding unit is used for generating coded data conforming to the ZPLII language format according to the ZPLII language graphic array code corresponding to the Chinese character, and the coded data comprises the ZPLII language graphic array code corresponding to the Chinese character.
Preferably, the query module further includes a template unit, configured to make a basic script template according to the zpli language, and set the feature variable in the basic script template.
Compared with the prior art, the method and the system for automatically printing Chinese characters by the barcode printer have the following beneficial effects: the problem that only fixed Chinese character bar codes can be printed in the prior art is solved, the color characteristics of a product are dynamically identified, corresponding Chinese characters are independently selected according to the color of the product, and the corresponding Chinese character bar codes are automatically printed; brings convenience to users and improves the efficiency of products.
Drawings
The above features, technical features, advantages and implementations of a method and system for automatically printing Chinese characters by a barcode printer will be further described in the following detailed description of preferred embodiments in a clearly understandable manner with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method for automatically printing Chinese characters by a bar code printer according to the present invention;
FIG. 2 is a schematic diagram of an embodiment of the present invention;
FIG. 3 is a schematic diagram of the structure of an automatic Chinese character printing system of a barcode printer according to the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
As shown in fig. 1, according to an embodiment of the present invention, a method for automatically printing Chinese characters by a barcode printer includes:
s1, obtaining color characteristics of a product, and obtaining Chinese characters corresponding to the color characteristics according to the color characteristics;
s2, searching the codes corresponding to the Chinese characters in a preset word stock, wherein the word stock is assembled by languages recognizable by a target printer;
s3, outputting the code to the target printer.
Preferably, step S1 specifically includes:
establishing a characteristic table, wherein the characteristic table stores the corresponding relation between the color characteristics of the product and the Chinese characters;
acquiring RGB values of a product image, and acquiring color characteristics corresponding to the product according to the RGB values;
and acquiring the Chinese characters corresponding to the color features according to the color features and a storage table.
In industrial product production, bar codes are printed on products of the same batch. The color change of products in the same batch is relatively most applied, for example, "black", "white" and "yellow", a bar code label of a corresponding color needs to be printed for each product, and the color of the product needs to be automatically identified.
And establishing a characteristic table, and storing the corresponding relation between the color characteristics of the product and the Chinese characters in the characteristic table. For example, the color feature of the product is displayed as "yellow", and the feature table corresponds to the Chinese character "yellow".
And acquiring RGB values of the product image, and acquiring the color characteristics corresponding to the product according to the RGB values. In one embodiment of the present invention, an industrial camera is installed on a production line of an industrial product, the industrial camera is used to photograph the industrial product as it passes by, and the acquired image of the product is analyzed using an image processing technique. And acquiring an RGB value of a product image, judging the color of the product image according to the RGB value, and acquiring the color characteristic corresponding to the product. And inquiring Chinese characters corresponding to the color features according to the color features corresponding to the products and the corresponding relation between the color features of the products and the Chinese characters stored in the feature table.
Preferably, the setting of the preset word stock specifically includes:
and converting preset Chinese characters into ZPLII language graphic array codes through a bar code editing tool, and storing the corresponding relation between the Chinese characters and the converted ZPLII language graphic array codes.
The barcode editing tool is a specialized barcode LABEL design software such as CODESOFT, BAR-ONE, LABEL MATRIX, etc. The bar code editing tool can complete the conversion from Chinese characters to graphic array codes of ZPLII language, and convert the Chinese characters into the graphic array codes of ZPLII language, and the graphic array codes of ZPLII language are ASCII codes with 16 system. A user converts preset Chinese characters into ZPLII language graphic array codes through a bar code editing tool according to needs, and sets the corresponding relation between the Chinese characters and the converted ZPLII language graphic array codes. In the actual production of the product, the Chinese characters of the Chinese bar code to be printed are not particularly numerous, which is determined by the characteristics of the product, for example, the colors include "black", "white", "yellow", and the like, so that a word stock corresponding to the Chinese characters such as "black", "white", "yellow", "color" and the like needs to be made, the Chinese characters are converted into corresponding ZPLII language graphic array codes through a bar code editing tool, and the corresponding relation between each Chinese character and the converted ZPLII language graphic array codes is stored. Therefore, it is simple and convenient for the user to set the word stock in advance through the bar code editing tool.
In a specific embodiment of the present invention, the setting of the chinese character library is specifically described by taking a barcode editing tool CODESOFT as an example. On the editing interface of the tool CODESOFT, the Chinese character "black" to be made is input, the "TRUE TYPE" option is selected, and the font formats of the Chinese character "black" such as font, font size, style and the like are set, as shown in fig. 2. And clicking a 'completion' button to confirm completion after the font format of the black Chinese character is edited. The method specifically comprises the steps of selecting a printer, adding a file port of a zebra printer, storing the file port as an additional file, inputting a file name, storing the file name as a script file, wherein the stored script file is not a complete ZPLII language graphic array code, and finding out the ZPLII language graphic array code corresponding to the black Chinese character in the generated script file by using the ZPLII language.
The graphic array code corresponding to the Chinese character "black" is as follows:
“00,00,00,00,00,00,00,00,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFF0000000FFF80000007FF8,0000FFF0000000FFF80000007FF8,0000FFF0000000FFF80000007FF8,0000FFF000F800FFF800F0007FF8,0000FFF003F800FFF801FE007FF8,0000FFF00FFC00FFF801FF807FF8,0000FFF03FFC00FFF803FFF07FF8,0000FFF07FFE00FFF803FFF07FF8,0000FFF07FFE00FFF807FFF07FF8,0000FFF07FFF00FFF807FFF07FF8,0000FFF07FFF00FFF80FFFF07FF8,0000FFF03FFF80FFF80FFFE07FF8,0000FFF03FFF80FFF81FFFC07FF8,0000FFF01FFFC0FFF83FFFC07FF8,0000FFF01FFFC0FFF83FFF807FF8,0000FFF00FFFE0FFF87FFF007FF8,0000FFF00FFFE0FFF87FFF007FF8,0000FFF007FFF0FFF8FFFE007FF8,0000FFF007FFF0FFF9FFFE007FF8,0000FFF003FFF0FFF9FFFC007FF8,0000FFF003FFF0FFF9FFF8007FF8,0000FFF001FFC0FFF83FF8007FF8,0000FFF001FF00FFF807F0007FF8,0000FFF000FC00FFF800F0007FF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,0000FFFC000000FFF8,0000FFFC000000FFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000FFFFFFFFFFFFFFFFFFFFFFF8,0000F800000000FFF800000000F8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,00000000000000FFF8,0FFFFE00000000FFF800000003FFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF,00,0001F0,0001FE0000000000001F000007F0,0001FFE00000000003FF00003FF0,0003FFF0001FF0001FFF0001FFF8,0003FFF000FFF8001FFF0001FFF8,0003FFF000FFF8001FFF8001FFF8,0007FFE000FFF8000FFF8001FFFC,0007FFE000FFF8000FFF8000FFFC,000FFFC000FFF8000FFFC000FFFE,000FFF80007FFC0007FFC0007FFE,001FFF80007FFC0007FFC0003FFF,001FFF00007FFC0007FFE0003FFF,003FFF00007FFC0007FFE0001FFF80,003FFF00007FFC0003FFE0001FFF80,007FFE00003FFE0003FFF0001FFFC0,007FFE00003FFE0003FFF0000FFFC0,00FFFC00003FFE0003FFF0000FFFE0,00FFFC00003FFE0001FFF80007FFE0,01FFFC00003FFE0001FFF80007FFE0,03FFF800003FFE0001FFF80007FFE0,03FFF800003FFE0001FFC00003FF80,03FFF000003FFE0000FE000003FE,01FFF000001FFE000000000003F8,003FE000001E00000000000001E0,000FE0,00,00,00,00,”
and storing the ZPLII language graphic array code corresponding to the Chinese character black to obtain the ZPLII language graphic array code corresponding to the Chinese character black, and establishing the corresponding relation between the Chinese character black and the converted ZPLII language graphic array code. According to the method, a Chinese character library of a plurality of Chinese characters is set.
Preferably, step S2 specifically includes:
acquiring ZPLII language graphic array codes corresponding to Chinese characters in the word stock;
and generating coded data conforming to the ZPLII language format, wherein the coded data comprises ZPLII language graphic array codes corresponding to the Chinese characters.
In the zpli language, objects may be coded either in text or in graphic arrays. And inquiring ZPLII language graphic array codes corresponding to the Chinese characters in the word stock. And generating coded data conforming to a ZPLII language format according to the ZPLII language graphic array code corresponding to the Chinese character through the programming of the ZPLII language, wherein the coded data comprises the ZPLII language graphic array code corresponding to the Chinese character.
Preferably, step S2 further includes:
manufacturing a basic script template by using a ZPLII language, and setting a characteristic variable in the basic script template;
and acquiring ZPLII language graphic array codes corresponding to Chinese characters in the character library, and replacing the characteristic variables with the ZPLII language graphic array codes corresponding to the Chinese characters.
In an embodiment of the present invention, in order to improve the convenience of barcode printing, a basic script template is made using the zpli language, and a feature variable is set in the basic script template. And when the printing is executed, calling the basic script module, replacing the characteristic variables in the basic script template with ZPLII language graphic array codes corresponding to the Chinese characters, generating data in a ZPLII language format, and sending the data to a target printer. For example, a script template is written by using the zpli language, and a basic script template of a label only needing to be printed with a color is formulated, wherein the basic script template is as follows:
lambda// start marker
Landings of ^ FWN ^ CFD,24^ PW1204^ LH0,0// position coordinate and the like
^ CI0^ PR2^ MNY ^ MTT ^ MMT ^ MD15^ PON ^ PMN ^ LRN// print option identification
A0N,25,26 FO25,20 FDcolor: < COLOR > < FS// printed text
xZ// end flag
In the basic script template described above, the feature variable is < COLOR >.
In the production process of the product, an image of the product is obtained by photographing the product, RGB values of the image are obtained, the color of the image is judged to be black according to the RGB values, Chinese character black corresponding to the black in a word stock is inquired, and ZPLII language graphic array codes corresponding to the Chinese character black are obtained. And acquiring a set basic script template, finding a characteristic variable < COLOR > in the basic script template, replacing data in the original basic script template with ZPLII language graphic array codes corresponding to Chinese characters 'black', generating data in a ZPLII language format, and sending the data to a target printer. According to the technical scheme, the basic script template is utilized, and only characteristic variables in the basic script template need to be replaced, so that a better experience effect is brought to a user.
Preferably, step S3 specifically includes:
and the target printer acquires the coded data, identifies the ZPLII language graphic array code corresponding to the Chinese characters and prints the Chinese characters.
The target printer obtains coded data through a serial port or parallel port communication mode, identifies the format of the ZPLII language, identifies the ZPLII language graphic array code corresponding to the Chinese character, converts the code corresponding to the coded data into a code controlled by the printer, and prints the Chinese character.
According to the technical scheme, in the production process of a product, the color of the product is identified, the color characteristic of the product is obtained, then the Chinese characters corresponding to the color characteristic in a word stock are inquired, the ZPLII language graphic array code corresponding to the Chinese characters is further obtained, and the code is sent to a target printer, so that the target printer finishes the bar code printing of the Chinese characters. In the production process of the product, the color of the product is dynamically identified, and the corresponding bar code label is printed according to the color of the product, so that convenience is brought to a user, and the production efficiency is improved. For example, the color of the product is automatically identified to be black, and the black corresponding Chinese character ' black ' in the Chinese character library is inquired, so that the bar code printing of the black Chinese character ' can be completed.
As shown in fig. 3, according to an embodiment of the present invention, a system for automatically printing Chinese characters by a barcode printer includes:
the image module 30 is configured to obtain color characteristics of a product, and obtain Chinese characters corresponding to the color characteristics according to the color characteristics;
the query module 31 is configured to query a preset word stock for codes corresponding to the Chinese characters, where the word stock is assembled by a language recognizable by a target printer;
an output module 32 for outputting the code to the target printer.
Preferably, the image module 30 specifically includes:
the characteristic storage unit is used for establishing a characteristic table which stores the corresponding relation between the color characteristics of the product and the Chinese characters;
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring an RGB value of a product image and judging a color characteristic corresponding to the product according to the RGB value;
and the query unit is used for querying the corresponding Chinese characters in the characteristic table according to the color characteristics.
The image module 30 obtains the color feature of the product, and obtains the Chinese characters corresponding to the color feature according to the color feature. Specifically, a feature table is established in the feature storage unit of the image module 30, and the feature table stores the corresponding relationship between the color features of the product and the Chinese characters. For example, the color feature is black, and black is established in the storage table to correspond to the Chinese character "black". The RGB value of the product image is obtained through an obtaining unit, and the color characteristic corresponding to the product is judged according to the RGB value. In one embodiment of the present invention, an industrial camera is installed on a product production line, and the industrial camera is used to photograph the product as it passes by. In the acquisition unit, an RGB value of a product image is acquired, the color of the product image is judged according to the RGB value, and the color characteristic corresponding to the product is acquired. And the query unit queries the feature table in the feature storage unit according to the color features corresponding to the product, and searches the Chinese characters corresponding to the color features in the feature table.
Preferably, the query module 31 specifically includes:
the word stock unit is used for converting preset Chinese characters into ZPLII language graphic array codes through a bar code editing tool and storing the corresponding relation between the Chinese characters and the converted ZPLII language graphic array codes;
the searching unit is used for searching the ZPLII language graphic array code corresponding to the Chinese character in the character library unit;
and the coding unit is used for generating coded data conforming to the ZPLII language format according to the ZPLII language graphic array code corresponding to the Chinese character, and the coded data comprises the ZPLII language graphic array code corresponding to the Chinese character.
The query module 31 queries the code corresponding to the Chinese character in a preset word stock, wherein the word stock is assembled by a language recognizable by the target printer. Specifically, in the word stock unit, a preset Chinese character is converted into a ZPLII language graphic array code through a bar code editing tool, and the corresponding relation between the Chinese character and the converted ZPLII language graphic array code is stored. The bar code editing tool can complete the conversion from Chinese characters to graphic array codes of ZPLII language, and convert the Chinese characters into the graphic array codes of ZPLII language, and the graphic array codes of ZPLII language are ASCII codes with 16 system. The barcode editing tool is a specialized barcode LABEL design software such as CODESOV, BAR-ONE, LABEL MATRIX. And inquiring ZPLII language graphic array codes corresponding to the Chinese characters in the word stock unit through a searching unit. And in the coding unit, programming is carried out according to the format of the ZPLII language to generate coded data which accords with the ZPLII language format, wherein the coded data comprises a ZPLII language graphic array code corresponding to the Chinese character. In the zpli language, objects may be coded either in text or in graphic arrays.
The encoded data is output to the target printer via an output module 32. And the target printer acquires and identifies the coded data and executes the bar code printing of the Chinese characters.
Preferably, the query module further includes a template unit, configured to make a basic script template according to the zpli language, and set the feature variable in the basic script template.
The template unit uses ZPLII language to make a basic script template, and sets characteristic variables in the basic script template. And when the printing is executed, calling the basic script module, replacing the characteristic variables in the basic script template with ZPLII language graphic array codes corresponding to the Chinese characters, generating data in a ZPLII language format, and sending the data to a target printer.
According to the technical scheme, the color characteristics of the product are dynamically identified in the production process of the product, and the corresponding bar code label is printed according to the color characteristics of the product, so that convenience is brought to a user, and the production efficiency is improved.
In conclusion, the method and the system for automatically printing Chinese characters by the bar code printer solve the problem that only fixed Chinese bar codes can be printed in the prior art, realize automatic selection of corresponding Chinese characters according to product colors, print corresponding Chinese character bar codes and bring convenience to users.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (5)

1. A method for automatically printing Chinese characters by a bar code printer is characterized by comprising the following steps:
s1, obtaining color characteristics of a product, and obtaining Chinese characters corresponding to the color characteristics according to the color characteristics; step S1 specifically includes:
establishing a characteristic table, wherein the characteristic table stores the corresponding relation between the color characteristics of the product and the Chinese characters;
acquiring RGB values of a product image, and acquiring color characteristics corresponding to the product according to the RGB values;
acquiring Chinese characters corresponding to the color features according to the color features and a storage table;
s2, searching the codes corresponding to the Chinese characters in a preset word stock, wherein the word stock is assembled by languages recognizable by a target printer; the setting of the preset word stock specifically comprises the following steps: converting preset Chinese characters into ZPLII language graphic array codes through a bar code editing tool, and storing the corresponding relation between the Chinese characters and the converted ZPLII language graphic array codes; step S2 specifically includes:
acquiring ZPLII language graphic array codes corresponding to Chinese characters in the word stock;
generating coded data which accords with a ZPLII language format, wherein the coded data comprises a ZPLII language graphic array code corresponding to the Chinese character;
s3, outputting the codes to the target printer; step S3 specifically includes:
and the target printer acquires the coded data, identifies the ZPLII language graphic array code corresponding to the Chinese characters and prints the Chinese characters.
2. The method for automatically printing Chinese characters by a barcode printer according to claim 1, wherein the step S3 specifically comprises:
and the target printer acquires the coded data, identifies the ZPLII language graphic array code corresponding to the Chinese characters and prints the Chinese characters.
3. The method for automatically printing Chinese characters by a barcode printer according to claim 1, wherein the step S2 further comprises:
manufacturing a basic script template by using a ZPLII language, and setting a characteristic variable in the basic script template;
and acquiring ZPLII language graphic array codes corresponding to Chinese characters in the character library, and replacing the characteristic variables with the ZPLII language graphic array codes corresponding to the Chinese characters.
4. A system for automatically printing Chinese characters by a bar code printer is characterized by comprising:
the image module is used for acquiring the color characteristics of a product and acquiring Chinese characters corresponding to the color characteristics according to the color characteristics; the image module specifically includes:
the characteristic storage unit is used for establishing a characteristic table which stores the corresponding relation between the color characteristics of the product and the Chinese characters;
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring an RGB value of a product image and judging a color characteristic corresponding to the product according to the RGB value;
the query unit is used for querying the corresponding Chinese characters in the characteristic table according to the color characteristics;
the query module is used for querying the code corresponding to the Chinese character in a preset word stock, and the word stock is assembled by a language which can be recognized by a target printer; the query module specifically includes:
the word stock unit is used for converting preset Chinese characters into ZPLII language graphic array codes through a bar code editing tool and storing the corresponding relation between the Chinese characters and the converted ZPLII language graphic array codes;
the searching unit is used for searching the ZPLII language graphic array code corresponding to the Chinese character in the character library unit;
the coding unit is used for generating coded data conforming to a ZPLII language format according to the ZPLII language graphic array code corresponding to the Chinese character, and the coded data comprises the ZPLII language graphic array code corresponding to the Chinese character;
an output module to output the code to the target printer.
5. The system of claim 4, wherein the query module further comprises a template unit for creating a basic script template according to ZPLII language, and setting the feature variables in the basic script template.
CN201710992087.9A 2017-10-23 2017-10-23 Method and system for automatically printing Chinese characters by bar code printer Active CN107728965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710992087.9A CN107728965B (en) 2017-10-23 2017-10-23 Method and system for automatically printing Chinese characters by bar code printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710992087.9A CN107728965B (en) 2017-10-23 2017-10-23 Method and system for automatically printing Chinese characters by bar code printer

Publications (2)

Publication Number Publication Date
CN107728965A CN107728965A (en) 2018-02-23
CN107728965B true CN107728965B (en) 2021-07-02

Family

ID=61212328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710992087.9A Active CN107728965B (en) 2017-10-23 2017-10-23 Method and system for automatically printing Chinese characters by bar code printer

Country Status (1)

Country Link
CN (1) CN107728965B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110077138B (en) * 2019-04-24 2021-02-05 厦门联泰标识信息科技有限公司 Multi-state jet printing method for high-resolution ink jet printer

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6873806B2 (en) * 2002-05-20 2005-03-29 Nisca Corporation Image forming system with adaptability based on operator identification
CN101149669A (en) * 2006-09-22 2008-03-26 英华达(上海)科技有限公司 Words coded conversion method
CN103841292A (en) * 2012-11-20 2014-06-04 艾塔斯科技(镇江)有限公司 Operating method of scanner and scanner
CN105667098A (en) * 2012-01-25 2016-06-15 精工爱普生株式会社 Label printer and control method for the label printer

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6498657B1 (en) * 1999-03-17 2002-12-24 Prout Ag Programmable data extractor, data analyzer, and printer report generator
KR100664926B1 (en) * 2004-10-06 2007-01-04 삼성전자주식회사 Apparatus and method for direct printing
CN101992609B (en) * 2010-09-30 2012-08-29 武汉钢铁(集团)公司 Label printing device based on large-size host machine platform
US10184057B2 (en) * 2011-03-01 2019-01-22 Thomas Villwock Nanoparticle suspension for inkjet printing magnetizable characters on a substrate
EP3031032A4 (en) * 2012-08-09 2017-03-29 WINK-APP Ltd. A method and system for linking printed objects with electronic content

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6873806B2 (en) * 2002-05-20 2005-03-29 Nisca Corporation Image forming system with adaptability based on operator identification
CN101149669A (en) * 2006-09-22 2008-03-26 英华达(上海)科技有限公司 Words coded conversion method
CN105667098A (en) * 2012-01-25 2016-06-15 精工爱普生株式会社 Label printer and control method for the label printer
CN103841292A (en) * 2012-11-20 2014-06-04 艾塔斯科技(镇江)有限公司 Operating method of scanner and scanner

Also Published As

Publication number Publication date
CN107728965A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
EP0561606B1 (en) Method and system for labeling a document for storage, manipulation, and retrieval
TWI407771B (en) Method and apparatus for efficient processing of color conversion
JPH04366662A (en) Method of coloration of monochromatic document
CN101122898A (en) Layout splicing method and equipment
CN103607524A (en) Cigarette case 32-bit code image acquisition and processing device and cigarette case 32-bit code identification method
US6776342B1 (en) Process for the parameterization of scanners for one-dimensional or two-dimensional printed codes
CN107728965B (en) Method and system for automatically printing Chinese characters by bar code printer
JP2020170309A (en) Image processing system, image processing device, image processing method, and program
EP0590949A2 (en) Variable replacement apparatus
US11155102B2 (en) Image to script converter
CN110211484B (en) Electronic price tag display method, system, server and storage medium
CN113467369B (en) Automatic drilling and riveting numerical control code visual interactive correction method
CN107330399A (en) Chinese character splitting method and device, computer storage medium and electronic equipment
CN116009793A (en) Printing method
CN102744739A (en) Program controlled paper-cutting method using bar code to read cutting information
CN115878055A (en) Tracing file generation method and device, storage medium and computer equipment
CN114132091B (en) Bar code printing method and device
CN114881612A (en) Method, device, equipment and medium for realizing integrated printing and writing of engineering data
US11249697B2 (en) Printing system and printing method
JP2010240844A (en) Label printer, program, and label printing system
CN114265566A (en) Printing method, printing device, electronic equipment and readable storage medium
JP7383882B2 (en) Information processing device and information processing program
CN111967069A (en) Automatic flower writing system and automatic flower writing method
US11128775B2 (en) Meta information transmission system through printed matter, printing control apparatus, printed matter reading apparatus, method for applying meta information for printed matter, and method for acquiring meta information from printed matter
CN117634525A (en) Label real-time printing method and device based on BarTender

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201102

Address after: 318015 no.2-3167, zone a, Nonggang City, no.2388, Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Applicant after: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Applicant before: Phicomm (Shanghai) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230116

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 318015 no.2-3167, area a, nonggangcheng, 2388 Donghuan Avenue, Hongjia street, Jiaojiang District, Taizhou City, Zhejiang Province

Patentee before: Taizhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230412

Address after: Room B1005, B1012, B1013, Pengxin Building, No. 458 Nanhu Road, Tianxin District, Changsha City, Hunan Province, 410000

Patentee after: Changsha Yiqi Information Technology Co.,Ltd.

Address before: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee before: Huzhou YingLie Intellectual Property Operation Co.,Ltd.