回复 1楼ellennet的帖子
ellennet 你好,
直接打印到纸张无法实现此功能,建议先打印到 PDF 文件,再打印:
测试代码:
- if (IsPostBack)
- return;
- this.FpSpread1.Sheets[0].RowCount = 100;
- this.FpSpread1.Sheets[0].PageSize = 100;
- for (int i = 0; i < 100; i++)
- {
- for (int j = 0; j < 4; j++)
- {
- this.FpSpread1.Sheets[0].Cells[i, j].Value = i.ToString() + "+" + j.ToString();
- }
- }
- FarPoint.Web.Spread.PrintInfo prinf = new FarPoint.Web.Spread.PrintInfo();
- prinf.RepeatRowStart= 0;
- prinf.RepeatRowEnd = 0;
-
- FpSpread1.ActiveSheetView.PrintInfo = prinf;
- this.FpSpread1.SavePdfToResponse("testrepeatrow.pdf");
复制代码 |