您好,
经过调查,您的frmaework的版本可以升级到最新,看是否能够解决问题。
另外,提供一个替代的方案,主要是通过一个临时的Spread来完成打印- FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo();
- pi.ShowColor = false;
- pi.Preview = true;
- pi.ShowPrintDialog = true;
- SheetView view = FarPoint.Win.Serializer.LoadObjectXml(fpSpread1.ActiveSheet.GetType(), FarPoint.Win.Serializer.GetObjectXml(fpSpread1.ActiveSheet, "CopySheet"), "CopySheet") as SheetView;
- view.Cells[0, 0, view.RowCount-1, view.ColumnCount-1].ResetBackColor();
- view.Cells[0, 0, view.RowCount-1, view.ColumnCount-1].ResetForeColor();
- view.PrintInfo = pi;
- FpSpread spread = new FpSpread();
- spread.Sheets.Add(view);
- spread.PrintSheet(0);
复制代码
希望能够帮助到您。 |