抱歉SmartPrintPagesTall需要设置一个大一点的值。
- fpSpread1.ActiveSheet.ColumnCount = 40;
- fpSpread1.ActiveSheet.RowCount = 500;
- fpSpread1.ActiveSheet.Cells[499, 39].Value = "End";
- fpSpread1.ActiveSheet.PrintInfo.Preview = true;
- fpSpread1.ActiveSheet.PrintInfo.EnhancePreview = true;
- FarPoint.Win.Spread.SmartPrintRulesCollection rules = new FarPoint.Win.Spread.SmartPrintRulesCollection();
- rules.Add(new FarPoint.Win.Spread.ScaleRule(FarPoint.Win.Spread.ResetOption.None, 1F, 0.01F, 0.01F));
- fpSpread1.ActiveSheet.PrintInfo.SmartPrintRules = rules;
- fpSpread1.ActiveSheet.PrintInfo.UseSmartPrint = true;
- fpSpread1.ActiveSheet.PrintInfo.Orientation = PrintOrientation.Landscape;
- fpSpread1.ActiveSheet.PrintInfo.SmartPrintPagesWide = 1;
- fpSpread1.ActiveSheet.PrintInfo.SmartPrintPagesTall = 9999;
- fpSpread1.PrintSheet(0);
复制代码 |