为什么 A5纸 第一页内容横打印正常 ,第二页内容就打直了
Dim Str(20) As String
'Tables("pos_transaction_poll").Filter="[pos_no]= '"& P_pos_no &"' "
'Tables("pos_master_poll").Filter="[pos_no]= '"& P_pos_no &"' "
Dim doc As PrintDoc = e.Form.GernatePrintDoc()
Dim ps As New System.Drawing.Printing.PrinterSettings
'Dim POS_TRANSACTION_1 As WinForm.Table = e.Form.Controls("POS_TRANSACTION_1")
'Dim POS_TRANSACTION_POLL As WinForm.Table = e.Form.Controls("POS_TRANSACTION_POLL")
Dim rt As prt.RenderText '定义一个文本对象
'MessageBox.Show ( " PageNo" & [PageNo] )
rt = New prt.RenderText '设置文本对象的内容
'rt.Text = "第[PageNo]頁,共[PageCount]頁" '设置文本内容
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Right '靠右对齐
'rt.Style.Borders.Bottom = New prt.LineDef(0.3, Color.Green) '设置底边框
rt.Style.Padding.Bottom = 0.5 '底端内容缩进0.5毫米
rt.Style.FontSize = 8 '字体大小为8磅
Doc.PageFooter = rt '作为页眉使用
Dim ps2 As New System.Drawing.Printing.PrinterSettings
ps2.Copies = 1 '设置份数'
doc.PageSetting.PaperKind = 11 ' a5
doc.PageSetting.Landscape=True
'e.Form.Page.PaperKind = 11 '纸张类型改为A5
'e.Form.Page.Landscape = False
If P_computer_name<>"POS-KC" Then
Doc.PrinterName ="HP_M183FW"
Else
Doc.PrinterName ="HP_M183FW-1"
End If
doc.Print '打印
'Doc.Preview
Dim frm As WinForm.Form
frm = Forms("invoice")
frm.Close()
'Syscmd.Project.Exit()