这是现有代码:
Dim doc As New PrintDoc '定义一个报表
Dim rx As new prt.RenderText '定义一个文本对象
Dim x As Integer = 0 '定义水平偏移参数
Dim y As Integer = 0 '定义垂直偏移参数
Dim CurRow As Row = Tables("基本信息").Current
rx = new prt.RenderText
rx.Text = CurRow("单位名称")
rx.x = 60 + x '设置坐标的时候,注意加上偏移参数
rx.y = 34 + y
rx.Style.FontBold = True '字体加粗
rx.Style.FontSize = 14 '字体大小为16磅
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = CurRow("法人")
rx.x = 118 + x
rx.y = 44 + y
rx.Style.FontBold = True '字体加粗
rx.Style.FontSize = 14 '字体大小为16磅
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = CurRow("单位地址")
rx.x = 60 + x
rx.y = 54 + y
rx.Style.FontBold = True '字体加粗
rx.Style.FontSize = 12 '字体大小为16磅
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = CurRow("邮政编码")
rx.x = 156 + x
rx.y = 54 + y
rx.Style.FontBold = True '字体加粗
rx.Style.FontSize = 14 '字体大小为16磅
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = CurRow("联系电话")
rx.x = 70 + x
rx.y = 64 + y
rx.Style.FontBold = True '字体加粗
rx.Style.FontSize = 14 '字体大小为16磅
doc.body.Children.Add(rx)
'加入更多的打印对象....
Doc.PrinterName = e.Form.Controls("ComboBox1").text
doc.Print()
以下是纵向送入打印机的图片

此主题相关图片如下:微信图片_20210418140437.jpg

这样可以正常套打,可是横向送入打印机时,我应该如何修改代码?以下是横向送入打印机的图片:
[此贴子已经被作者于2021/4/18 14:16:58编辑过]