参考下面的代码,自己改一下width
Dim doc As New PrintDoc
Dim rt As New prt.RenderArea
'Dim Cur As Row = Tables("业务大表").Current
For Each i As String In "abc123456"
Dim r As New prt.RenderText
r.text = i
If IsNumeric(i) Then
r.Style.Font = New Font("宋体", 16)
r.Width = 8
Else
r.Style.Font = New Font("宋体", 8)
r.Width = 5
End If
rt.Children.Add(r)
Next
rt.Stacking = prt.StackingRulesEnum.InlineLeftToRight
rt.X = 68
rt.Y = 62
doc.Body.Children.Add(rt)
doc.PageSetting.Landscape = True
doc.PageSetting.Width = 330
doc.PageSetting.Height = 300
Doc.PageSetting.LeftMargin = 13
Doc.PageSetting.TopMargin = 40
doc.AutoRotate = False
Doc.Preview()