您好,
根据您的代码,做了以下修改
- $("#btnPrint").click(function () {
- var printInfo = spread.getActiveSheet().printInfo();
- printInfo.showColumnHeader(GcSpread.Sheets.PrintVisibilityType.Hide);
- printInfo.showRowHeader(GcSpread.Sheets.PrintVisibilityType.Hide);
- printInfo.showGridLine(false);
- printInfo.showBorder(false);
- printInfo.margin({ top: 0, bottom: 0, left: 0, right: 0, header: 0, footer: 0 });
- printInfo.paperSize(new GcSpread.Sheets.PaperSize(1200, 750));
- printInfo.pageOrder(GcSpread.Sheets.PrintPageOrder.OverThenDown);
- spread.getActiveSheet().printInfo(printInfo);
- spread.print(spread.getActiveSheetIndex());
- });
复制代码 |