回复 15楼iceman的帖子
Raizos 你好,
关于 打印 Spread 问题,不建议通过新的线程打印,可以尝试使用以下代码:
- public void PrintToPdf ( string file,string pdfFile )
- {
- //new Thread ( ( ) =>
- //{
- FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo ( );
- printset.PrintToPdf = true;
- printset.PdfFileName = pdfFile;
- printset.PdfWriteTo = FarPoint.Win.Spread.PdfWriteTo.File;
- printset.ShowGrid = false;
- printset.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide;
- printset.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide;
- printset.UseSmartPrint = true;
- FarPoint.Win.Spread.FpSpread spread = new FarPoint.Win.Spread.FpSpread ( );
- spread.Open ( file );
- spread.ActiveSheet.PrintInfo = printset;
- spread.PrintSheet ( spread.ActiveSheet );
- //} ).Start ( );
- }
复制代码 |