Dim doc As New PrintDoc
Dim rt As New prt.RenderArea
Dim rm As prt.RenderEmpty '定一个空对象
Dim Cur As Row = Tables("表A").Current
For Each i As String In Cur("第一列")
Dim r As New prt.RenderText
r.text = i & " "
If IsNumeric(i) Then
r.Style.Font = New Font("宋体",12,FontStyle.Underline)
r.Width = 2
Else
r.Style.Font = New Font("宋体", 12)
r.Width = 2
End If
rt.Children.Add(r)
If i = vblf Then
rm = new prt.RenderEmpty '定义一个新的空对象
rm.BreakBefore = prt.BreakEnum.Line
rt.Children.Add(rm)
End If
Next
rt.Stacking = prt.StackingRulesEnum.InlineLeftToRight
rt.X = 68
rt.Y = 62
rt.Width = 38
doc.Body.Children.Add(rt)
doc.PageSetting.Landscape = True
doc.PageSetting.Width = 300
doc.PageSetting.Height = 200
Doc.PageSetting.LeftMargin = 13
Doc.PageSetting.TopMargin = 10
doc.AutoRotate = False
Doc.Preview()