Cell background fill on PDF export
-
Hi,
Firstly, an absolutely awesome extension – thank you for your hard work.
I’m trying to reproduce this code to change the cell background on export via PDF:
$(document).ready( function () { var table = $('#example').DataTable({ dom: 'Bfrtip', buttons: [ { extend: "pdfHtml5", customize: function(doc) { console.log(table.column(3).data().toArray()) age = table.column(3).data().toArray(); for (var i = 0; i < age.length; i++) { if (age[i] < 40) { doc.content[1].table.body[i+1][3].fillColor = 'blue'; } } } } ] }); } );I’ve been trying for over 2 hours and am not sure how to best implement it, as of now I’ve always used the ‘custom commands’ section of the table to add functionality, but this time I’m stuck :-/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Cell background fill on PDF export’ is closed to new replies.