e.Form.Page.Width =110 '纸张宽度为100毫米
e.Form.Page.Height = 135 '纸张高度为120毫米
'e.Form.Page.LeftMargin = e.form.controls("NumericComboBox1").value
e.Form.Page.LeftMargin = 0 '设置左边距
e.Form.Page.RightMargin = 0 '设置右边距
e.Form.Page.TopMargin = 0 '设置上边距
e.Form.Page.BottomMargin = 0 '设置下边距
Dim doc As PrintDoc = e.Form.GernatePrintDoc()
doc.PageSetting.Landscape = True '横向打印
Dim rt As New prt.RenderText '定义一个文本对象
rt.Text = "123456" '设置文本对象的内容
rt.Style.TextColor = Color.Red '字符颜色设为红色
rt.Style.TextAngle = -90 '顺时钟旋转45度
rt.x = 10
rt.y = 20
doc.Body.Children.Add(rt)
rt = New prt.RenderText
rt.Text = "123456"
rt.Style.TextColor = Color.Red '字符颜色设为红色
rt.Style.TextAngle = -90 '顺时钟旋转45度
rt.x = 40
rt.y = 20
doc.Body.Children.Add(rt)
'Dim ps As new System.Drawing.Printing.PrinterSettings
'ps.Copies = e.Form.Controls("NumericComboBox1").Text
'doc.Print(ps) '打印
doc.Preview() '预览