Can I add multiple tables when exporting to pdf?

Can I add multiple tables when exporting to pdf?

warningx06warningx06 Posts: 4Questions: 3Answers: 0
edited March 8 in Free community support

```$('#example').DataTable({
dom: 'Bfrtip',
buttons: [
{
extend: 'pdfHtml5',
customize: function (doc) {
var table = document.createElement("table")
var tbody = document.createElement("tbody")
var tr = document.createElement("tr")
var tdImage = document.createElement("td")
var tdTitle = document.createElement("td")
var tdContent = document.createElement("td")
var logo = document.createElement("img")
logo.src = "asd"

            tdTitle.textContent = "TEST"
            tdContent.textContent = "ABC"
            tdImage.appendChild(logo)
            tr.append(tdContent);
            tr.append(tdTitle);
            tr.append(tdImage);
            tbody.append(tr);
            table.append(tbody);
        }
    }
]

});```

I want to add one more table when exporting the pdf. Is it possible? How can I add?

Sign In or Register to comment.