Bar codes are essential in some manufacturing industries. For example, you need to scan the barcode for data collection to print work orders, store raw materials in and out of the warehouse, and ship finished products out of the warehouse. Recently, I found that the company printed a bar code on the work order and printed the ticketProgramIt was written in PHP.Source codeIs implemented. Originally, a barcode generated class transfers the corresponding data to the program and generates JPG files.
I searched the internet for other methods to Implement barcode, and found a foreign open-source program dedicated to generating "one-dimensional Barcode ". First, review the bar code knowledge.
Bar code classification
I. Classification by code
1. UPC code
In 1973, the United States took the lead in using UPC codes in domestic commercial systems. Canada also adopted UPC codes in commercial systems. UPC code is a fixed-length continuous digital code system. Its Character Set is numbers 0 ~ 9. It uses four element widths. Each entry or entry is 1, 2, 3, or 4 times the width of the element. IPC code has two types, namely UPC-A code and UPC-E code.
2. EAN Code
In 1977, countries of the European Economic Community developed the European item code EAN in accordance with the UPC code standard, which is compatible with the UPC code and has the same symbol system. The character number structure of the EAN Code is the same as that of the UPC code. It is also a fixed and continuous digital code system. Its Character Set is numbers 0 ~ 9. It uses four element widths. Each entry or entry is 1, 2, 3, or 4 times the width of the element. There are two types of EAN Code: EAN-13 code and EAN-8 code.
3. Cross 25 yards
The cross-25 code is a variable-length continuous self-validation digital code system. Its Character Set is numbers 0 ~ 9. The width of each element is either wide or narrow. The number of encoded characters is an even number. All data at the odd position is encoded in strips, and data at the even position is encoded in null. If it is an odd number of data encodings, add a digit 0 before the data so that the data is an even number.
4. 39 yards
39 yards is the first alphanumeric code system. Launched by intermec in 1974. It is a digital code system with comparable discrete self-correction risk letters. The character set contains numbers 0-9, 26 uppercase letters, and 7 special characters (-,. , Space,/, %, ¥), a total of 43 characters. Each character is composed of nine elements, five of which are (2 wide bars, 3 narrow bars) and four are empty (1 wide blank, 3 Narrow Spaces ), is a discrete code.
5. kudaba code
The code bar, which appeared in 1972, is a variable-length continuous self-verification digital code system. Its character set is 0-9 and six special characters (-,:,/,. , +, ¥), A total of 16 characters. It is often used in warehouses, blood banks, and air parcels.
6. 128 yards
128 yards appeared in 1981, a variable-length continuous self-validation digital code system. It uses four element widths, each of which consists of three characters and three null characters. It has 11 elements in width, also known. It consists of 106 different character sets, which have three different meanings: A, B, and C. It uses these three alternate character sets to encode 128 ASCII codes.
7. 93 yards
93 yards is a variable-length continuous alphanumeric code system. Its Character Set Becomes a number. 0-9, 26 uppercase letters and 7 special characters (-,. , Space,/, +, %, ¥), and 4 control characters. Each character consists of three and three unique characters, with a total of nine element widths.
8. 49 yards
49 yards is a multi-row continuous, variable-length alphanumeric code system. Appeared in 1987, mainly used for symbols on small item labels. Multiple Element widths are used. The character set contains numbers 0-9, 26 uppercase letters, and 7 special characters (-,. , Space, %,/, +, %, ¥), 3 function keys (F1, Tuo, F3), and 3 Conversion characters, a total of 49 characters.
9. Other code systems
In addition to the above Code, there are other code systems, such as 25 code, which appeared in 1977 and is mainly used for electronic component tags; matrix 25 code is the deformation of 11 code; the nixdorf code has been replaced by the EAN Code. Plessey code was used in libraries in May 1971.
Ii. Classification by Dimension
1. Common one-dimensional Barcode
Ordinary one-dimensional bar codes have been popularized and widely used since their publication. However, because the information capacity of one-dimension bar codes is small, for example, the bar codes on products can only contain 13 digits of Arabic numbers, more information about products can only rely on the support of databases, after leaving the pre-built database, this bar code becomes useless water and useless wood. Therefore, the application scope of the bar code is limited.
2. Two-dimensional Barcode
In addition to the advantages of common bar codes, two-dimensional bar codes also have the advantages of large information capacity, high reliability, strong confidentiality and counterfeiting prevention, easy production, and low cost. <Br> in April, symbol officially launched a two-dimensional code called, or for short, "Portable Data File ". Fdf417 barcode is a high-density, high-Information Portable data file. It is an ideal means to automatically store, carry, and read large-capacity and high-reliability information such as certificates and cards.
3. Multi-dimensional Barcode
Since 1980s, people have studied how to increase the information density of bar code symbols. Multi-dimensional barcode and container barcode have become the research, development and application directions. <Br> information density is an important parameter used to describe a bar code symbol, that is, the number of letters that may be written in a unit length. It is usually recorded as the number of letters/cm. The main factors affecting the information density are the stripe, empty structure, and narrow element width. <Br> 128 and 93 are successful attempts to increase the density. 128 yards city was recommended in 1981, and 93 yards was put into use in 1982. The symbol density of these two codes is nearly 30% higher than that of 39 codes. <Br> with the development of bar code technology and the increasing types of bar code three, bar code standardization becomes increasingly important. To this end, we have successively formulated military standards of 1189, cross 25 code, 39 code, and Coda bar code ANSI standard mh10.8m. At the same time, some industries have begun to establish industry standards to adapt to the needs of development. After that, David arlier developed 49 yards. This is a non-traditional bar code symbol, which has a higher density than the previous bar code symbol. Ted Williams (Ted Williams) gfi988 introduced 16 K code, which is similar to 49 Code. It is a relatively new type of code system and is suitable for laser systems.
Barcode instance
1. Codabar manual reference
- Supports: [0-9], [A-D],-$:/. +
- Must start and end with a letter
- Contains an auto-checksum, no checksum number
2. Code 11 manual reference
- Supports: [0-9],-
- Rarely used
- Contains auto-checksum numbers
3. Code 39 manual reference
- Supports: [0-9], [A-Z],-. $/+ % [space]
- Really used, sort uses
- Contains a optional checksum
- Resulting barcode is pretty big
4. Code 39 extended manual reference
- Supports: [0-9], [A-Z],-. $/+ % [space] + ASCII 0-127
- The extension of this barcode is optional. You must specify your reader that you read code 39 extended.
5. Code 93 manual reference
- Supports: [0-9], [A-Z],-. $/+ % [space] + ASCII 0-127
- Similar to code 39 but less used
- Supports ASCII 0-127 and is not optional like the code 39
- Bigger Density
6. code 128 manual reference
- Supports: [0-9], [A-Za-Z], tous les characteres
- Contains 3 tables to better encode data
- Groups numbers by two for a better compression
7. EAN-8 manual reference
- Supports: [0-9]
- Encodes 7 numbers and a checksum number
- It's the EAN-13 short version
- You have to get a number with a license to use in the public
8. EAN-13 manual reference
- Supports: [0-9]
- Encodes 12 numbers with a checksum number
- It is the UPC-A extension which adds the Country Code
- You have to get a number with a license to use in the public
9. ISBN-10/ISBN-13 manual reference
- Supports: [0-9]
- Based on EAN-13, used for books
- You have to get a number with a license to use in the public
10. interleaved 2 of 5 manual reference
- Supports: [0-9]
- Based on standard 2 of 5
- Optional checksum number
11. Standard 2 of 5 manual reference
- Supports: [0-9]
- Hard to read for readers because really low density
- Optional checksum number
12. MSI Plessey manual reference
- Supports: [0-9]
- Formerly used for inventory
- Optional checksum number
13. UPC-A manual reference
- Supports: [0-9]
- Encoded like EAN-13
- Encodes 11 numbers with a checksum number
- The numbers depends on what you need
- You have to get a number with a license to use in the public
14. UPC-E manual reference
- Supports: [0-9]
- Short version of UPC-A
- Encodes 7 numbers with a checksum number
- The numbers depends on what you need
- You have to get a number with a license to use in the public
15. UPC extension 2 manual reference
- Supports: [0-9]
- Contains 2 Characters
- Indicates more information on the product
- Must be joined to a UPC or EAN symbol
16. UPC Extension 5 manual reference
- Supports: [0-9]
- Contains 5 Characters
- Usually indicates the suggested price of the product
- Must be joined to a UPC or EAN symbol
17. PostNet manual reference
- Supports: [0-9]
- Contains either 5, 9 or 11 numbers
- Used to encode envelopes in United States
18. Other manual reference
- Create your own Barcode
- Add the text you want
References: http://www.barcodephp.com/1d/overview.php
To be continued ......