pdfHtml5 Showing partial div tag at end of each row
pdfHtml5 Showing partial div tag at end of each row

Hi there,
Looking for an explanation as to why the pdf generator might display a partial ending div tag at the end of a row.
Hosted here
Same thing occurs whether stripHtml option is true/false.
Relevant JS:
$( function(){
var logTable = $("#logTable").DataTable({
'dom': 'Brftip',
'paging':false,
'scrollY': '64vh',
'scrollCollapse':true,
'fnRowCallback': function( nRow, aData, iDisplayIndex ) {
nRow.className = "selectable";
return nRow;
},
buttons: [
{
extend: 'pdfHtml5',
download: 'open',
pageSize: 'LETTER',
filename: 'Log for' + formatDate(new Date, "yyyy-MM-dd HH-mm-ss"),
stripHtml: true,
/* customize: function(doc){
doc.content[1].table.widths = Array(doc.content[1].table.body[0].length +10).join('*').split('');
}*/
},
{
text: 'Clear',
action: function(){
var conf = $('<div id="confirmClear title="Confirm Clear?"><span id="dialogMsg"></span</div>');
conf.dialog({
modal: true,
resizable: false,
height: "auto",
width: "400px",
exportOptions: {
format: {
body: function(data, column, row) {
data = data.replace(/<.*?>/g, "");
return $.trim(data);
}
}
},
buttons: {
"Clear Log": function(){
$("#logTable").DataTable().clear().draw();
conf.dialog("close");
}
}
});
}
}
]
});
$("#logTable tbody").on("click", "tr", function(){
$(this).toggleClass('danger');
});
$("#inputField").keypress(function(key){
now = formatDate(new Date, "yyyy-MM-dd HH:mm:ss");
var freezeTime = now;
currentValue = $("#inputField").val();
if (showTime) {
$("#inputTime").val(now);
showTime = false;
}
if (key.keyCode == 13) {
var msg = "<div class='messageContainer'>"+escapeHtml(currentValue)+"</div";
submitLine($("#inputTime").val(), msg, logTable);
return false;
}
});
});
Thanks
Matthew
This discussion has been closed.
Answers
Hi Matthew,
I get "No data available in table" there. Is that expected?
Allan