您好,我这边调了一下,代码贴出来您参考:
- function setPrintInfo(sheet) {
- var printInfo = sheet.printInfo();
- printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(GC.Spread.Sheets.Print.PaperKind.a4));
- printInfo.orientation(GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
- printInfo.centering(GC.Spread.Sheets.Print.PrintCentering.horizontal);
- printInfo.margin({top:0, bottom:0, left:0, right:0, header:0, footer:0});
- printInfo.showBorder(false);
- printInfo.showGridLine(false);
- printInfo.footerCenter("&P/&N");
- printInfo.showColumnHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
- printInfo.showRowHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
- printInfo.zoomFactor(0.4);
- }
复制代码 |