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.PaperKind = 8 '纸张类型改为A3
doc.PageSetting.Width = 241
doc.PageSetting.Height =139.7
doc.AutoRotate = False '禁止自动旋转打印内容
doc.PageSetting.Landscape = True '方向
Doc.PrinterName = GetConfigValue("收货运单打印机","")
doc.Preview()
e.Form.Close
以上代码,是打印在标准的241-2的纸张上,预览时正常的,打印却是错误的,
如果改为doc.PageSetting.Landscape = False '方向
预览方向错误,但是打印却是正常的。
求教。
[此贴子已经被作者于2013-12-12 11:20:04编辑过]