\'e.Form.Page.Width = 80
\'e.Form.Page.Height = 40
\'e.Form.Page.LeftMargin = 0
\'e.Form.Page.TopMargin = 0
Dim doc As PrintDoc = e.Form.GernatePrintDoc(grp)
Doc.AutoRotate = False
doc.PageSetting.Width = 80 \'纸张宽度为100毫米
doc.PageSetting.Height = 40 \'纸张高度为120毫米
doc.PageSetting.LeftMargin = 0
doc.PageSetting.RightMargin = 0
doc.PageSetting.TopMargin = 0
doc.PageSetting.BottomMargin = 0
\' doc.PageSetting.Landscape = True
\'doc.AutoRotate = False
doc.PrinterName = "TTP-245"
doc.Preview()