回复 1楼rainer的帖子
请尝试一下代码:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- FarPoint.Web.Spread.PrintInfo prinf = new FarPoint.Web.Spread.PrintInfo();
- prinf.BestFitCols = true;
- prinf.BestFitRows = true;
- prinf.Margin = new FarPoint.Web.Spread.PrintMargin(10, 10, 0, 0, 0, 0);
- prinf.UseSmartPrint = true;
- FpSpread1.ActiveSheetView.PrintInfo = prinf;
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- this.FpSpread1.SavePdf(this.Server.MapPath("test.pdf"));
- }
复制代码
如果没能满足需求,由于不清楚楼主的 Spread 数据格式,请上传 Demo 到论坛调试。 |