我的一栏中有很多医生的名字。在将表格数据打印为 pdf 时,我想要为每位医生提供单独的 pdf。我正在 CodeIgniter 3 上做这个项目。我使用 window.print() 将数据表中的数据打印为 pdf。
我的一栏中有很多医生的名字。在将表数据打印为 pdf 时,我希望通过使用 window.print() 将数据表中的数据打印为 pdf,为 CodeIgniter 3 中的每个医生单独生成 pdf。
function printContent(el) {
var rp =
document.body.innerHTML;
var pc =
document.getElementById(el).innerHTML;
document.body.innerHTML = pc;
window.print();
document.body.innerHTML = rp;
} < script src = "print.js" > < /script>
<
link rel = "stylesheet"
type = "text/css"
href = "print.css" >
<
button type = "button"
onclick = "printJS({ printable: 'table_print', type: 'html', header: 'Title' })" > Print < /button> <
div class = "table-responsive"
id = "table_print" >
<
!--table-- >
<
/div>