最短的代码字符数用于绘制Code 39条形码的ASCII表示.
关于Code 39的维基百科文章:http: //en.wikipedia.org/wiki/Code_39
输入将是Code 39条形码的一系列合法字符.这意味着43个字符有效:0- 9 A- Z (space) and -.$/+%.该*字符不会出现在输入中,因为它用作开始和结束字符.
Code 39条形码中编码的每个字符都有九个元素,五个条形和四个空格.条形将用#字符表示,空格用空格字符表示.九个元素中的三个将是广泛的.窄元素将是一个字符宽,宽元素将是三个字符宽.应在每个字符图案之间添加单个空格的字符间空格.应重复该模式,以使条形码的高度为八个字符高.
开始/停止字符*(bWbwBwBwb)将表示如下:
# # ### ### #
# # ### ### #
# # ### ### #
# # ### ### #
# # ### ### #
# # ### ### #
# # ### ### #
# # ### ### #
^ ^ ^^ ^ ^ ^ ^^^
| | …Run Code Online (Sandbox Code Playgroud) 我有jpg格式的条形码图像,并希望从中提取条形码#.请帮忙!
我正在尝试使用python3和reportlab生成两列条形码:
from reportlab.graphics.barcode import code39
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import mm
from reportlab.pdfgen import canvas
c = canvas.Canvas("barcode_example.pdf", pagesize=A4)
code_list = [
'E100', 'RA100',
'E101', 'RA101',
'E102', 'RA102',
'E103', 'RA103',
'E104', 'RA104',
'E105', 'RA105',
'E106', 'RA106',
'E107', 'RA107',
'E108', 'RA108',
'E109', 'RA109']
x = 1 * mm
y = 278 * mm
x1 = 6.4 * mm
for i, code in enumerate(code_list):
barcode = code39.Extended39(code, barWidth=0.6*mm, barHeight=15*mm)
if i % 2 == 0:
barcode.drawOn(c, x, y)
x1 = …Run Code Online (Sandbox Code Playgroud) 我在旧版AS/400系统生成的纸质表格上有一个条形码字段,我需要转换为更现代的报表系统.我一直试图追踪这个条形码字段使用的编码,但我找不到任何有关于报告过程的第一手知识的人.
据我所知,生成报告的系统是在20世纪80年代中期开发的.
以下是相关条形码的示例.报告上的条形码旁边没有打印字母数字字段,因此到目前为止我还无法对编码进行逐字符分析.我怀疑它是Code 39,但我希望在继续之前更有信心.

编辑
这是我尝试使用Code 39表手动解码的图像.

也许有一个简单的解决方案,但我似乎无法找到一个,我需要增加条码的高度而不增加字体大小.
// Barcode Text Block
TextBlock barcode = new TextBlock();
barcode.Text = "12345678-123";
barcode.FontFamily = new FontFamily("Free 3 Of 9");
barcode.Margin = new Thickness(736, 638, 0, 50);
barcode.FontSize = 65;
page.Children.Add(barcode);
// Baarcode Number Text Block
TextBlock pageText = new TextBlock();
string s = "*12345678-123*";
s = s.Insert(1, " ").Insert(3, " ").Insert(5, " ").Insert(7, " ").Insert(9, " ").Insert(11, " ").Insert(13, " ").Insert(15, " ").Insert(17, " ").Insert(19, " ").Insert(21, " ").Insert(23, " ").Insert(25, " ");
pageText.Text = s;
pageText.FontFamily = new …Run Code Online (Sandbox Code Playgroud) 我的应用程序正在生成 Code 39 条形码,但客户的文档管理系统在扫描并重新打印打印件后识别条形码时遇到问题。
我还使用在线条形码阅读器对其进行了测试,该阅读器确认其最终文档上的条形码不可读。
是否有一种最佳类型的条形码可供使用,可以在其他地方打印、扫描和重新打印后提供最佳结果?
以下是直接来自应用程序的 PDF 中的原始条形码:
这是打印、扫描和重新打印后的条形码:
使用在线条形码阅读器进行测试的结果是:
很抱歉,我们在上传的图片中找不到任何条形码。
我正在使用 GNU Barcode 生成条形码:
$ barcode -h
barcode: Options:
-i <arg> input file (strings to encode), default is stdin
-o <arg> output file, default is stdout
-b <arg> string to encode (use input file if missing)
-e <arg> encoding type (default is best fit for first string)
-u <arg> unit ("mm", "in", ...) used to decode -g, -t, -p
-g <arg> geometry on the page: [<wid>x<hei>][+<margin>+<margin>]
-t <arg> …Run Code Online (Sandbox Code Playgroud) code39 ×6
barcode ×4
c# ×2
code-golf ×1
ibm-midrange ×1
mainframe ×1
python-3.x ×1
reportlab ×1
wpf ×1