此主题相关图片如下:捕获.png
老师,怎样把面板里的内容按比例打印到我自己设置的纸张大小的对面位置(位置,还有大小)
打印代码
Dim grp As WinForm.Panel = e.Form.Controls("Panel7")
e.Form.Page.Width = 190 '纸张宽度为100毫米
e.Form.Page.Height = 150 '纸张高度为120毫米
e.Form.Page.LeftMargin = 5 '设置左边距
e.Form.Page.RightMargin = 10 '设置右边距
e.Form.Page.TopMargin = 5 '设置上边距
e.Form.Page.BottomMargin = 10 '设置下边距
e.Form.Page.Landscape = True '横向打印
Dim doc As PrintDoc = e.Form.GernatePrintDoc(grp)
doc.Preview()