NPOI2.0 版本的打印设置有问题:
ISheet sheet = hssfworkbook.CreateSheet(sheetName);
sheet.SetMargin(MarginType.RightMargin, (double)0.1);
sheet.SetMargin(MarginType.TopMargin, (double)0.1);
sheet.SetMargin(MarginType.LeftMargin, (double)0.1);
sheet.SetMargin(MarginType.BottomMargin, (double)0.1);
sheet.PrintSetup.PaperSize = (short)PaperSize.A4;
sheet.PrintSetup.Scale = 95;
sheet.FitToPage = true;
sheet.PrintSetup.FitWidth = 1;
sheet.PrintSetup.FitHeight = 1;
像这些设置在1.2.5 很正常,但是2.0的就有问题, 边距,纸张不能够正常设置~
ISheet sheet = hssfworkbook.CreateSheet(sheetName);
sheet.SetMargin(MarginType.RightMargin, (double)0.1);
sheet.SetMargin(MarginType.TopMargin, (double)0.1);
sheet.SetMargin(MarginType.LeftMargin, (double)0.1);
sheet.SetMargin(MarginType.BottomMargin, (double)0.1);
sheet.PrintSetup.PaperSize = (short)PaperSize.A4;
sheet.PrintSetup.Scale = 95;
sheet.FitToPage = true;
sheet.PrintSetup.FitWidth = 1;
sheet.PrintSetup.FitHeight = 1;
像这些设置在1.2.5 很正常,但是2.0的就有问题, 边距,纸张不能够正常设置~