'Barcode'에 해당되는 글 3건
- 2009.02.14 Code 128 Specification
- 2009.02.06 Javascript Key Event Test Script
- 2009.02.03 바코드 이미지 출력
Code 128 Specification
CODE 128 allows the full ASCII 128 character set to be encoded. By using 4 different bar and space widths it achieves a more compact symbol than would be possible using the older binary (Two bar/space widths) barcode symbologies.
Code 128 may be scanned bidirectionally and there is no restriction on the number of characters allowed in each symbol. There will however be a practical limit determined by the physical size of the resulting barcode and the scanning equipment.
Code 128 has three different character sets defined in the table below as Code Set A, Code Set B and Code Set C. Any of these codes may be selected by appropriate selection of start character. Special 'shift' characters in each Code Set enable an alternative Code Set to be substituted during the scanning process. In this way the physical size of symbol may be minimised by pseudo intelligent algorithms in printing software like Barcode Mill. If the data consists only of numeric data then Code Set C provides twice the packing density of Code Sets A and B. Each code set has one or more characters reserved for special functions.
The Code 128 Specification requires the inclusion of a check digit. The barcode symbol structure consists of...
- A quiet zone, or white space to the left of the bars
- Start character
- A variable number of data characters
- Check digit
- Stop character
- A quiet zone or white space to the right of the bars
The quiet zone should be at least ten times the width of the narrowest bar/space element.
Each character in the barcode symbol is composed of three bars and three spaces. (The stop character has four bars and three spaces as the final symbol will always have a final (extra) bar.)
Each bar or space can be one of four different unit widths. The narrowest possible bar or space will thus be one quarter the width of the widest. The table holds the bar/space widths for all the Code 128 character set. Notice that the sum of the barwidths in any character is always even, and the sum of the space widths is odd. The first column in the table,'The Value', is the value used to calculate the check digit.
The Code 128 specification allows for Human readable information to be printed anywhere outside of the symbol area.
Check Digit Calculation
The check digit is a Modulus 103 checksum. It is calculated by summing the start code 'value' to the products of each character's 'value' multiplied by its position in the barcode string. The left most character is position 1. The sum of the start code value and the products is divided by 103. The remainder is the check digits 'value'. Our Barcode Mill software calculates the check digit for you.
Example... To calculate the check digit for the barcode data string 'Code 128'
Value Total ===== ===== Start Code B 104 104 Position 1 C 35 1 x 35 = 35 Position 2 o 79 2 x 79 = 158 Position 3 d 68 3 x 68 = 204 Position 4 e 69 4 x 69 = 276 Position 5 0 5 x 0 = 0 Position 6 1 17 6 x 17 = 102 Position 7 2 18 7 x 18 = 126 Position 8 8 24 8 x 24 = 192 ===== 1197 ===== 1197/103 = 11 remainder 64 The check digit is the character from the table with value 64
Code 128 Barcode Table
Value | Code Set A | Code Set B | Code Set C | Bar/Space Pattern B S B S B S |
---|---|---|---|---|
0 | SP | SP | 00 | 2 1 2 2 2 2 |
1 | ! | ! | 01 | 2 2 2 1 2 2 |
2 | " | " | 02 | 2 2 2 2 2 1 |
3 | # | # | 03 | 1 2 1 2 2 3 |
4 | $ | $ | 04 | 1 2 1 3 2 2 |
5 | % | % | 05 | 1 3 1 2 2 2 |
6 | & | & | 06 | 1 2 2 2 1 3 |
7 | ' | ' | 07 | 1 2 2 3 1 2 |
8 | ( | ( | 08 | 1 3 2 2 1 2 |
9 | ) | ) | 09 | 2 2 1 2 1 3 |
10 | * | * | 10 | 2 2 1 3 1 2 |
11 | + | + | 11 | 2 3 1 2 1 2 |
12 | , | , | 12 | 1 1 2 2 3 2 |
13 | - | - | 13 | 1 2 2 1 3 2 |
14 | . | . | 14 | 1 2 2 2 3 1 |
15 | / | / | 15 | 1 1 3 2 2 2 |
16 | 0 | 0 | 16 | 1 2 3 1 2 2 |
17 | 1 | 1 | 17 | 1 2 3 2 2 1 |
18 | 2 | 2 | 18 | 2 2 3 2 1 1 |
19 | 3 | 3 | 19 | 2 2 1 1 3 2 |
20 | 4 | 4 | 20 | 2 2 1 2 3 1 |
21 | 5 | 5 | 21 | 2 1 3 2 1 2 |
22 | 6 | 6 | 22 | 2 2 3 1 1 2 |
23 | 7 | 7 | 23 | 3 1 2 1 3 1 |
24 | 8 | 8 | 24 | 3 1 1 2 2 2 |
25 | 9 | 9 | 25 | 3 2 1 1 2 2 |
26 | : | : | 26 | 3 2 1 2 2 1 |
27 | ; | ; | 27 | 3 1 2 2 1 2 |
28 | < | < | 28 | 3 2 2 1 1 2 |
29 | = | = | 29 | 3 2 2 2 1 1 |
30 | > | > | 30 | 2 1 2 1 2 3 |
31 | ? | ? | 31 | 2 1 2 3 2 1 |
32 | @ | @ | 32 | 2 3 2 1 2 1 |
33 | A | A | 33 | 1 1 1 3 2 3 |
34 | B | B | 34 | 1 3 1 1 2 3 |
35 | C | C | 35 | 1 3 1 3 2 1 |
36 | D | D | 36 | 1 1 2 3 1 3 |
37 | E | E | 37 | 1 3 2 1 1 3 |
38 | F | F | 38 | 1 3 2 3 1 1 |
39 | G | G | 39 | 2 1 1 3 1 3 |
40 | H | H | 40 | 2 3 1 1 1 3 |
41 | I | I | 41 | 2 3 1 3 1 1 |
42 | J | J | 42 | 1 1 2 1 3 3 |
43 | K | K | 43 | 1 1 2 3 3 1 |
44 | L | L | 44 | 1 3 2 1 3 1 |
45 | M | M | 45 | 1 1 3 1 2 3 |
46 | N | N | 46 | 1 1 3 3 2 1 |
47 | O | O | 47 | 1 3 3 1 2 1 |
48 | P | P | 48 | 3 1 3 1 2 1 |
49 | Q | Q | 49 | 2 1 1 3 3 1 |
50 | R | R | 50 | 2 3 1 1 3 1 |
51 | S | S | 51 | 2 1 3 1 1 3 |
52 | T | T | 52 | 2 1 3 3 1 1 |
53 | U | U | 53 | 2 1 3 1 3 1 |
54 | V | V | 54 | 3 1 1 1 2 3 |
55 | W | W | 55 | 3 1 1 3 2 1 |
56 | X | X | 56 | 3 3 1 1 2 1 |
57 | Y | Y | 57 | 3 1 2 1 1 3 |
58 | Z | Z | 58 | 3 1 2 3 1 1 |
59 | [ | [ | 59 | 3 3 2 1 1 1 |
60 | \ | \ | 60 | 3 1 4 1 1 1 |
61 | ] | ] | 61 | 2 2 1 4 1 1 |
62 | ^ | ^ | 62 | 4 3 1 1 1 1 |
63 | _ | _ | 63 | 1 1 1 2 2 4 |
64 | NUL | ` | 64 | 1 1 1 4 2 2 |
65 | SOH | a | 65 | 1 2 1 1 2 4 |
66 | STX | b | 66 | 1 2 1 4 2 1 |
67 | ETX | c | 67 | 1 4 1 1 2 2 |
68 | EOT | d | 68 | 1 4 1 2 2 1 |
69 | ENQ | e | 69 | 1 1 2 2 1 4 |
70 | ACK | f | 70 | 1 1 2 4 1 2 |
71 | BEL | g | 71 | 1 2 2 1 1 4 |
72 | BS | h | 72 | 1 2 2 4 1 1 |
73 | HT | i | 73 | 1 4 2 1 1 2 |
74 | LF | j | 74 | 1 4 2 2 1 1 |
75 | VT | k | 75 | 2 4 1 2 1 1 |
76 | FF | I | 76 | 2 2 1 1 1 4 |
77 | CR | m | 77 | 4 1 3 1 1 1 |
78 | SO | n | 78 | 2 4 1 1 1 2 |
79 | SI | o | 79 | 1 3 4 1 1 1 |
80 | DLE | p | 80 | 1 1 1 2 4 2 |
81 | DC1 | q | 81 | 1 2 1 1 4 2 |
82 | DC2 | r | 82 | 1 2 1 2 4 1 |
83 | DC3 | s | 83 | 1 1 4 2 1 2 |
84 | DC4 | t | 84 | 1 2 4 1 1 2 |
85 | NAK | u | 85 | 1 2 4 2 1 1 |
86 | SYN | v | 86 | 4 1 1 2 1 2 |
87 | ETB | w | 87 | 4 2 1 1 1 2 |
88 | CAN | x | 88 | 4 2 1 2 1 1 |
89 | EM | y | 89 | 2 1 2 1 4 1 |
90 | SUB | z | 90 | 2 1 4 1 2 1 |
91 | ESC | { | 91 | 4 1 2 1 2 1 |
92 | FS | | | 92 | 1 1 1 1 4 3 |
93 | GS | } | 93 | 1 1 1 3 4 1 |
94 | RS | ~ | 94 | 1 3 1 1 4 1 |
95 | US | DEL | 95 | 1 1 4 1 1 3 |
96 | FNC 3 | FNC 3 | 96 | 1 1 4 3 1 1 |
97 | FNC 2 | FNC 2 | 97 | 4 1 1 1 1 3 |
98 | SHIFT | SHIFT | 98 | 4 1 1 3 1 1 |
99 | CODE C | CODE C | 99 | 1 1 3 1 4 1 |
100 | CODE B | FNC 4 | CODE B | 1 1 4 1 3 1 |
101 | FNC 4 | CODE A | CODE A | 3 1 1 1 4 1 |
102 | FNC 1 | FNC 1 | FNC 1 | 4 1 1 1 3 1 |
103 | Start A | Start A | Start A | 2 1 1 4 1 2 |
104 | Start B | Start B | Start B | 2 1 1 2 1 4 |
105 | Start C | Start C | Start C | 2 1 1 2 3 2 |
106 | Stop | Stop | Stop | 2 3 3 1 1 1 2 |
링크 : http://unixpapa.com/js/key.html
자바스크립트 키 이벤트 발생 내역 체크 테스트 사이트
자바스크립트 키 이벤트 내역 및 KeyCode를 확인할 수 있는 사이트,바코드 스캐너 등을 통하여 키 이벤트 발생 내역을 체크할 때 유용하다.
해당 이미지 파일을 <img>태그로 불러오는 형식을 사용.
App_Code 에서 정의된 클래스를 사용하면,
링크 주소를 return 합니다.
폰트로 출력한 것이 아니기 때문에,
이미지 크기를 왠만큼 변경해도 바코드 리더기에서 읽어들이는데 문제 없음.
바코드 크기, 폰트 크기, 간격 등 약간의 설정도 가능함.
자세한 것은 첨부 파일을 보면되고,
참고하는 소스는 B# 블로그에서 가져왔음.