Do not remove datatables styling for pdfmake
Do not remove datatables styling for pdfmake
INTONE
Posts: 153Questions: 58Answers: 6
in DataTables
Is there a way to not remove the datatables styling for pdf make or is there a way to add my own styling?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You need to refer to the pdfmake documentation about styling. It's beyond the scope of DataTables.
@tangerine is exactly correct. Moreover, the issue you will run into here is that the styling in DataTables is provided by CSS, but the pdfmake styling uses their own styling structure defined in their documentation. You'd need to translate from CSS to pdfmake as it doesn't have a simple option to export html as far as I am aware.
Allan
Thanks Allen.
Agreed, taking Tangerine's suggestion, solved formatting. New question is how to access the document definition generated by datatables.net to add styling. That is, my original question should've been...
How can I reference the pdfmake document definition that datatables.net generates?
The
customize
method of thepdfHtml5
button provides that information.There is an example here.
Allan
Problem solved!
Thanks Allen, you **ROCK ** dude!
One last thing, using this 'customize' method, is there anyway to apply footers to pdf/excel exports? Preferably at the bottom of the page, but after the content would be acceptable.
Thanks again
Do you mean table footers? If so, the button types all have a
footer
option - example.Allan