function printForm(receipts){ jsPrintSetup.setOption('orientation', jsPrintSetup.kPortraitOrientation ); //横向 jsPrintSetup.setOption('printBGColors',0); // 打印背景颜色 jsPrintSetup.setOption('printBGImages',0); // 打印背景图片 // 页面外围设置 jsPrintSetup.setOption('marginTop', 5); jsPrintSetup.setOption('marginBottom', 5); jsPrintSetup.setOption('marginLeft', 10); // 头部 左中右 内容 if(receipts != undefined) jsPrintSetup.setOption('headerStrLeft', receipts); jsPrintSetup.setOption('headerStrCenter', ''); jsPrintSetup.setOption('headerStrRight', '第&P页'); // 底部 左中右 内容 jsPrintSetup.setOption('footerStrLeft', ''); jsPrintSetup.setOption('footerStrCenter', ''); jsPrintSetup.setOption('footerStrRight', ''); jsPrintSetup.setOption('printSilent', 1); jsPrintSetup.print(); return receipts; }