📄 code128.htm
字号:
<HTML><HEAD><TITLE>Drawing Barcodes Code 128 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<LINK
href="global.css"
type=text/css rel=stylesheet>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY text=black vLink=purple aLink=red link=blue bgColor=white leftMargin=3
topMargin=3>
<TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#ff9900 border=0>
<TBODY>
<TR>
<TD width="100%"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=1 border=0>
<TBODY>
<TR vAlign=top>
<TD vAlign=top bgColor=#fbedbb rowSpan=2>
<P align=center> </P></TD>
<TD align=right width="100%" bgColor=white><A name=__top></A>
<TABLE align=center>
<TBODY>
<TR>
<TD class=smallText align=right>
</TD>
<TD></TD></TR>
<TR>
<TD class=smallText align=right colSpan=2>
</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top width="100%"><!-- Article Starts -->
<P align=center> </P>
<H2 align=center>Introduction</H2>
<P> A recent project
at work required that I write out barcode characters and read them. This
experience inspired me to start a side project writing some code that renders a
barcode on the Windows screen, given the proper input. This is the
result of that project</P>
<H2 align=center>Code 128 basics</H2>
<P>Code 128 is a very high density alpha-numeric code that was introduced
in 1981 and is being used in a variety of applications. Code 128
characters consist of 3 bars and 3 spaces, which are built by using 11
modules each of which can be black or white. Because all of the characters
are built from the same 11 modules, there really is only one element width
that needs to be defined, the module width. The bar/space patterns for the
107 data characters and the start/stop codes are listed below. Each
pattern is 11 characters (modules) long, and is either 'b' (that module is
a bar) or 's' (that module is a space). Note that there are three subsets
to Code 128, Subset A and B cover the ASCII character set, and Subset C is
a double-density numeric-only subset. Three different start characters
tell the barcode reader which subset is the starting subset, and three
shift characters allow changing subsets within a Code 128 barcode.</P>
<TABLE style="PAGE-BREAK-BEFORE: always" cellSpacing=0 cellPadding=0
width="100%" border=1>
<COLGROUP>
<COL width=51>
<COL width=51>
<COL width=51>
<COL width=51>
<COL width=51>
<TBODY>
<TR vAlign=top>
<TD width="20%" <P>Code A
<P></P></TD>
<TD width="20%" <P>Code B
<P></P></TD>
<TD width="20%" <P>Code C
<P></P></TD>
<TD width="20%" <P>Value
<P></P></TD>
<TD width="20%" <P>Pattern
<P></P></TD></TR>
<TR vAlign=top>
<TD width="20%" <P>Space
<P></P></TD>
<TD width="20%" <P>Space
<P></P></TD>
<TD width="20%" <P>00
<P></P></TD>
<TD width="20%" <P>0
<P></P></TD>
<TD width="20%" <P>bbsbbssbbss
<P></P></TD></TR>
<TR vAlign=top>
<TD width="20%" <P>!
<P></P></TD>
<TD width="20%" <P>!
<P></P></TD>
<TD width="20%" <P>01
<P></P></TD>
<TD width="20%" <P>1
<P></P></TD>
<TD width="20%" <P>bbssbbsbbss
<P></P></TD></TR>
<TR vAlign=top>
<TD width="20%" <P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -