您好,您的第二个表单的样式与第一个表单有比较多的出入,导致在打印时需要进行打印尺寸的调整,如下列代码所示:
- $("#printBtn2").click(function(){
- var sheet = $spread2.getActiveSheet();
- var pi = sheet.printInfo();
- pi.margin({ top: 0, bottom: 0, left: 0, right: 0, header: 0, footer: 0 });
- pi.paperSize(new GC.Spread.Sheets.Print.PaperSize(750, 1100));
- pi.zoomFactor(0.9);
- $spread2.print(0);
- })
复制代码 |