这个没有现成的方法。您可以调用OwnerPrintDraw 方法,然后自定义打印。
- private System.Drawing.Printing.PrintDocument pd;
- this.pd = new System.Drawing.Printing.PrintDocument();
- this.pd.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.pd_PrintPage);
- private void pd_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs ev)
- {
- Rectangle rect = new Rectangle(ev.PageBounds.X, ev.PageBounds.Y, ev.PageBounds.Width/2, ev.PageBounds.Height/2);
- int cnt = fpSpread1.GetOwnerPrintPageCount(ev.Graphics, rect, 0);
- fpSpread1.OwnerPrintDraw(ev.Graphics, rect, 0, cnt);
- ev.Graphics.DrawString("End of Print Job", new Font("MS Sans Serif", 10), new SolidBrush(Color.Black), new Rectangle(ev.PageBounds.X,
- ev.PageBounds.Y + ev.PageBounds.Height/2, ev.PageBounds.Width/2, ev.PageBounds.Height/2));
- ev.HasMorePages = false;
- }
复制代码 |