谢谢你的回答,因为我的打印的纸张是动态的 ,我是下面这样用的,有没有什么打印之前的回调函数呢
var viewer = GrapeCity.ActiveReports.JSViewer.create({
element: '#viewerPrinterContainer',
reportID: reportName + ";" + paraSessionID,
settings: { OnlyForPrint: 'true' },
//documentLoaded: () => viewer.print()
documentLoaded: () => {
var print = document.querySelector('[title="印刷..."]');
print.click();
}
}); |