Buttons will strip HTML from the export by default. You can stop it doing that using the stripHtml option of the buttons.exportData() method (which for the pdf button you can control using the exportOptions parameter).
On setting stripHtml = FALSE in exportOption. All the HTML are coming in the exported PDF but not working. Only the whole text with tags are coming.
Please find the attached PDF screenshot for example
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.
Ah, yep, thanks for the example, that helps. Unfortunately there's no quick answer, this thread discusses the same topic with some code at the end that you'll need to add to preserve those links,
Answers
Buttons will strip HTML from the export by default. You can stop it doing that using the
stripHtml
option of thebuttons.exportData()
method (which for thepdf
button you can control using theexportOptions
parameter).Allan
On setting stripHtml = FALSE in exportOption. All the HTML are coming in the exported PDF but not working. Only the whole text with tags are coming.
Please find the attached PDF screenshot for example
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
live.datatables.net/turuxegi/3/edit
Please refer to the example I did on live datatable.
On setting stripHtml = FALSE in exportOption. All the HTML are coming in the exported PDF but not working. Only the whole text with tags are coming.
I want the exported PDF should be the same as it is coming in the table. It should have all the link and styling.
Ah, yep, thanks for the example, that helps. Unfortunately there's no quick answer, this thread discusses the same topic with some code at the end that you'll need to add to preserve those links,
Colin
My requirement includes table inside the datatable for a column. how to preserve that?
Again, you would need to modify the code in the same way as the example in the thread I posted,
Colin