我用这段代码试了,打出来是横向的,你可以试试
Dim doc As New PrintDoc() '定义一个报表
doc.PageSetting.Landscape = True '横向打印
doc.AutoRotate = False '禁止自动旋转打印内容
doc.PageSetting.Width = 230 '纸张宽度为230毫米
doc.PageSetting.Height = 127 '纸张高度为127毫米
Doc.PageSetting.LeftMargin = 0 '设置左边距
Doc.PageSetting.RightMargin = 0 '设置右边距
Doc.PageSetting.TopMargin = 0 '设置上边距
Doc.PageSetting.BottomMargin = 0 '设置下边距
Dim ra As New prt.RenderArea
ra.Width = 85 '宽度为90毫米
ra.Height = 15 '高度为15毫米
ra.x = 115
ra.y = 50
Dim rx As prt.RenderText '定义一个文本对象
Dim CurRow As Row = Tables("客户信息").Current
rx = new prt.RenderText
rx.Style.FontSize = 12 '字体大小
rx.Text = "我的姓名"
rx.x = 33
rx.y = 30
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Style.FontSize = 12 '字体大小
rx.Text = "济南"
rx.x = 75
rx.y = 30
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = "发货单位"
rx.x = 40
rx.y = 37
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = "我的单位地址"
rx.x = 40
rx.y = 55
doc.body.Children.Add(rx)
doc.Body.Children.Add(ra) '将容器ra加入到报表
Doc.PrinterName = "Oki 5330SC"
Doc.Preview() '预览报表