回复 2楼Traum的帖子
Traum 你好,
1.A4 横向打印:
- printset.PaperSize = new System.Drawing.Printing.PaperSize("Letter", 600, 300);
- printset.PaperSource = new System.Drawing.Printing.PrinterSettings.PaperSources[0].SourceName;
- printset.Orientation = PrintOrientation.Landscape;
复制代码
2.通过以下代码设置:
- FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
- FarPoint.Win.Spread.SmartPrintRulesCollection prules = new FarPoint.Win.Spread.SmartPrintRulesCollection();
- // ... use best fit of columns and rows
- printset.BestFitCols = true;
- printset.BestFitRows = true;
- // ... or check by page size
- printset.SmartPrintPagesTall = 1;
- printset.SmartPrintPagesWide = 1;
- // ... or use the rules defined
- prules.Add(new FarPoint.Win.Spread.BestFitColumnRule(FarPoint.Win.Spread.ResetOption.None));
- prules.Add(new FarPoint.Win.Spread.LandscapeRule(FarPoint.Win.Spread.ResetOption.Current));
- prules.Add(new FarPoint.Win.Spread.ScaleRule(FarPoint.Win.Spread.ResetOption.None, 1, 0.6, 0.1));
- printset.SmartPrintRules = prules;
- printset.UseSmartPrint = true;
- // Assign the printer settings to the sheet and print it
- fpSpread1.Sheets[0].PrintInfo = printset;
- fpSpread1.PrintSheet(0);
复制代码
3.预览的接口是哪个?
预览Spread 内置方法只有 2# 代码,没有提供其他接口。 |