Foxtable(狐表)用户栏目专家坐堂 → [讨论]有关批量生成条码并标注的问题


  共有3232人关注过本帖树形打印复制链接

主题:[讨论]有关批量生成条码并标注的问题

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/10/15 9:36:00 [显示全部帖子]

Dim doc As New PrintDoc
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
For Each r As Row In Tables("表A").Rows
    bar.Code = r("第一列")
    Bar.HumanReadableText = r("第一列")
    Bar.BottomMargin = 2

    rg = new prt.RenderGraphics
    bar.DrawOnCanvas(rg.Graphics,0,0,1)
    rg.Style.Spacing.All = 3
    Doc.Body.Children.Add(rg)
Next
Doc.Preview()

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/10/15 15:11:00 [显示全部帖子]

Dim doc As New PrintDoc
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
Dim count As Integer = 1
For Each r As Row In Tables("表A").Rows
    bar.Code = r("第一列")
    Bar.HumanReadableText = r("第一列")
    Bar.BottomMargin = 2
    rg = new prt.RenderGraphics
    bar.DrawOnCanvas(rg.Graphics,0,0,1)
    rg.Style.Spacing.All = 3
    Doc.Body.Children.Add(rg)
    If count Mod (3 * 2) = 0 Then
        rg.BreakAfter = prt.BreakEnum.page
    Else If count Mod 3 = 0 Then
        rg.BreakAfter = prt.BreakEnum.line
    End If
    count += 1
Next
Doc.Preview()

 回到顶部