< pre>tag problem when exporting PDF
< pre>tag problem when exporting PDF

Hi there, when I export the dataTable to pdf, the < pre> tags that are inside the cells are not working. I put the pre tags in the render of the column.
Hope you have a solution,
Thanks!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi colin, thanks a lot for the quick answer.
Sorry, I can not provide a test case, but I can be more detailed:
I have a huge datable that two of it columns use a < pre > tag (in the tbody), in order to show the full sentence in one line. This are two full columns, so the idea I think it would have to. change the content of these columns...
I use the pdf export option:
buttons: [
{
extend: 'pdfHtml5',
orientation: 'landscape',
pageSize: 'A3',
extension : '.pdf',
text: '<i class="fa fa-file-pdf-o" aria-hidden="true"></i> PDF',
className: 'btn-a3',
header: true,
footer: true,
and in the customize function I give a little bit of style. Hope that with this info you can understand the problem.
Yep, we would need to see this. If you could create a very simple test case on http://live.datatables.net/ we'll take a look.
Colin
This is a short example
http://live.datatables.net/pimofite/1/edit?html,css,js,output
Wait for your answer! Thanks!
Thanks for that test case. You can do something like this: http://live.datatables.net/pimofite/2/edit
Here the code is fiddling with those
<pre>
tags, and replacing them with a\n
,Colin
Thanks!