点击打印 展示成这种样式,大概是啥问题。
// 公共配置 纸张 表行头 表列头 外表框
printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(GC.Spread.Sheets.Print.PaperKind.a4));
printInfo.showRowHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
printInfo.showColumnHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
printInfo.showBorder(false);
// printInfo.bestFitColumns(true);
// printInfo.bestFitRows(true);
// printInfo.fitPagesTall(1);
// printInfo.fitPagesWide(1);
// 开始行列结束行列
!!sheetPrintSet.pageCol && printInfo.columnEnd(sheetPrintSet.pageCol);
!!sheetPrintSet.pageRow && printInfo.rowEnd(sheetPrintSet.pageRow);
// 打印方向 pageDirection 1纵向
printInfo.orientation( sheetPrintSet.pageDirection == 1 ? GC.Spread.Sheets.Print.PrintPageOrientation.portrait : GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
// 对齐方式 pageCenterHori pageCenterVert
let printcenter= (sheetPrintSet.pageCenterHori==1 && sheetPrintSet.pageCenterVert==1) ? GC.Spread.Sheets.Print.PrintCentering.both : sheetPrintSet.pageCenterHori==1 ? GC.Spread.Sheets.Print.PrintCentering.horizontal : sheetPrintSet.pageCenterVert==1 ? GC.Spread.Sheets.Print.PrintCentering.vertical : GC.Spread.Sheets.Print.PrintCentering.none;
printInfo.centering(printcenter);
// 质量
// printInfo.qualityFactor(5);
// 边距
printInfo.margin({ top:!sheetPrintSet.ifHeaderFooter?sheetPrintSet.pageUp:30+sheetPrintSet.pageUp, bottom:!sheetPrintSet.ifHeaderFooter?sheetPrintSet.pageDown:30+sheetPrintSet.pageDown, left: sheetPrintSet.pageLeft, right: sheetPrintSet.pageRight, header:sheetPrintSet.pageHeader, footer:sheetPrintSet.pageFooter });
if(sheetPrintSet.uncertFlag && sheetPrintSet.uncertFlag == '1'){
printInfo.repeatColumnStart(sheetPrintSet.cycleStartCol);
printInfo.repeatColumnEnd(sheetPrintSet.cycleStartCol+sheetPrintSet.cycleColNum);
printInfo.repeatRowStart(sheetPrintSet.cycleStartRow);
printInfo.repeatRowEnd(sheetPrintSet.cycleStartRow+sheetPrintSet.cycleRowNum);
}
!!sheetPrintSet.ifHeaderFooter && this.setSheetHead(printInfo,sheetName,"&P/&N");
return printInfo
|