回复 1楼abcxpg的帖子
请参考代码:
- int m_curPage = 2;
- PrintDocument myPrintDoc = new PrintDocument();
- myPrintDoc.DefaultPageSettings.PaperSize = new PaperSize("default", thisTX.PageSize.Width, thisTX.PageSize.Height);
- myPrintDoc.DefaultPageSettings.Margins = new Margins(thisTX.PageMargins.Left, thisTX.PageMargins.Right, _
- thisTX.PageMargins.Top, thisTX.PageMargins.Bottom);
- myPrintDoc.PrinterSettings.PrintRange = PrintRange.SomePages;
- myPrintDoc.PrinterSettings.FromPage = m_curPage;
- myPrintDoc.PrinterSettings.ToPage = m_curPage;
- thisTX.Print(myPrintDoc);
复制代码 |