可以参考下面代码进行调整,需要纵向打印时,代码也需要设置orientation
- var count = spread.getSheetCount();
- var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
- printInfo.fitPagesWide(1);
- printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(600, 900));
- printInfo.orientation(GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
- printInfo.margin({ top: 30, bottom: 0, left: 0, right: 0, header: 0, footer: 0 });
- var sheet = spread.getSheet(count-1);
- sheet.printInfo(printInfo);
-
- spread.print(count-1);
复制代码
|