以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助] 条形码  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=136361)

--  作者:zcgmxf
--  发布时间:2019/6/12 7:33:00
--  [求助] 条形码
老师,下面的代码生成的条形码怎么无法扫描?谢谢!

Dim doc As New PrintDoc
Dim r As Row = Tables("职业健康检查表").Current
Dim Bar As New BarCodeBuilder
Dim img As prt.RenderImage
Bar.Symbology = Barpro.Symbology.Code39
bar.Code = r("条码号")
bar.HumanReadableText = r("姓名") 
bar.Text = r("性别") 
Bar.BarHeight = 10
Bar.QuietZoneWidth = 2
Bar.BarRatio = 0.3
Bar.AddCheckSum = False
Bar.DisplayChecksum = False
Bar.DisplayStartStopChar = False
Bar.TextAlignment = Barpro.Alignment.BelowRight
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
    For i As Integer = 1 To 3
        img = new prt.RenderImage
        img.Image = bar.GetImage
        Doc.Body.Children.Add(img)
    Next

Doc.Preview()

--  作者:有点蓝
--  发布时间:2019/6/12 8:58:00
--  
去掉Bar.BarRatio = 0.3
条码变形的过分了,所以无法识别