Dim doc As New PrintDoc
Dim img As prt.RenderImage
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.Code39
'Doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
Bar.BarRatio = 0.3
Bar.BarHeight = 18
Bar.QuietZoneWidth = 2
Bar.AddCheckSum = False
Bar.DisplayChecksum = False
For Each r As Row In Tables("表A").Rows
For i As Integer = 1 To 4
Dim ra As new prt.RenderArea
Dim txt As new prt.RenderText
txt.text = "XXXXXX公司"
txt.X = 10
txt.y = 5
ra.children.add(txt)
txt = new prt.RenderText
txt.text = r("姓名")
txt.x = 40
txt.y =5
ra.children.add(txt)
bar.Code = r("tm")
img = new prt.RenderImage
img.Image = bar.GetImage
img.x = 10
img.y = 10
ra.children.add(img)
Doc.Body.Children.Add(ra)
Next
Next
Doc.Preview()
想要一行打印4个,现在输出的是一行一个,同一条码输出4次.