Dim doc As New PrintDoc '定义一个新报表
doc.PageSetting.Height = 32 '标签纸高
doc.PageSetting.Width = 52 '标签纸宽
doc.PageSetting.Landscape = True ‘调整过
doc.PageSetting.LeftMargin = 1 '设置左边距
doc.PageSetting.RightMargin = 1 '设置右边距
doc.PageSetting.TopMargin = 1 '设置上边距
doc.PageSetting.BottomMargin = 1 '设置下边距
doc.AutoRotate = False '调整过
Dim rx As prt.RenderText
Dim rm As prt.RenderEmpty '定一个空对象
rm = new prt.RenderEmpty '定义一个新的空对象
rm.BreakBefore = prt.BreakEnum.Page '打印前换页
doc.Body.Children.Add(rm) '加入到报表中
rx = New prt.RenderText
rx.Text = "同协制造"
rx.Style.Font = New Font("黑体",14)
rx.X = 2
rx.Y = 3
Doc.Body.Children.Add(rx)
rx = New prt.RenderText
rx.Text = " No:513070001"
rx.Style.Font = New Font("宋体",12)
rx.X = 2
rx.Y = 9
Doc.Body.Children.Add(rx)
rx = New prt.RenderText
rx.Text = "用户:用户姓名"
rx.Style.Font = New Font("宋体",12)
rx.X = 2
rx.Y = 14
Doc.Body.Children.Add(rx)
rx = New prt.RenderText
rx.Text = "衣柜"
rx.Style.Font = New Font("宋体",12)
rx.X = 2
rx.Y = 22
Doc.Body.Children.Add(rx)
doc.Preview()