If Tables("卷宗入库").Current IsNot Nothing Then
Tables("入库明细").Filter = "卷宗编号 = '" & Tables("卷宗入库").Current("卷宗编号") & "'"
Dim doc As New PrintDoc
Dim rg As prt.RenderGraphics
Dim Bar As New BarCodeBuilder
Dim dr As Row=Tables("打印机").Current
e.Form.Page.Width = dr("设置宽度") ‘读取为24
e.Form.Page.Height = dr("设置高度") ‘读取为30
Doc.PrinterName = "'" & dr("打印机名称") & "'" ‘读取为兄弟9700
Dim xz As String = dr("是否旋转") ‘读取为false
doc.AutoRotate = xz
Bar.Symbology = Barpro.Symbology.QRCode
Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
For Each r As Row In Tables("入库明细").Rows
bar.Code = r("加密字符")
rg = new prt.RenderGraphics
bar.DrawOnCanvas(rg.Graphics,0,0,0.5)
rg.Style.Spacing.All = 1
Doc.Body.Children.Add(rg)
Next
Doc.Preview()
End If
[此贴子已经被作者于2017/10/24 11:02:05编辑过]