PDF exportOptions: Replacing space or line break - both don't seem to be working

PDF exportOptions: Replacing space or line break - both don't seem to be working

ziglertronziglertron Posts: 2Questions: 1Answers: 0

Hey there datatables enthusiasts - I am banging my head against the wall trying to get some address formatting to come out properly. It looks beautiful in the actual table view but when I go to PDF, for whatever reason my Street Name / Address City Zip are running together. I tried a variety of options of trying to do a data.replace but when I do, I destroy everything and get nothing but HTML codes popping up in the PDF.

Below is what's being displayed in my PDF:

123 E 30th AveAnytown,CO99999

should be:
123 E 30th Ave Anytown, CO 99999

This code works perfectly fine in "Print View" but not in PDF. In PDF, all HTML code is displayed -not text:

format: {
body: function (data, row, column, node) {
return column === 4 ?
data.replace(/\n/ig, "<br/>") :
data;
}
}
},

Obviously - this is urgent :). Your guidance is appreciated!

This discussion has been closed.