Do not remove datatables styling for pdfmake

Do not remove datatables styling for pdfmake

INTONEINTONE Posts: 153Questions: 58Answers: 6

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

Answers

  • tangerinetangerine Posts: 3,143Questions: 27Answers: 366

    You need to refer to the pdfmake documentation about styling. It's beyond the scope of DataTables.

  • allanallan Posts: 54,882Questions: 1Answers: 8,601 Site admin

    @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

  • lassenav@hotmail.comlassenav@hotmail.com Posts: 16Questions: 5Answers: 0

    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?

  • allanallan Posts: 54,882Questions: 1Answers: 8,601 Site admin
    Answer ✓

    The customize method of the pdfHtml5 button provides that information.

    There is an example here.

    Allan

  • lassenav@hotmail.comlassenav@hotmail.com Posts: 16Questions: 5Answers: 0

    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

  • allanallan Posts: 54,882Questions: 1Answers: 8,601 Site admin

    Do you mean table footers? If so, the button types all have a footer option - example.

    Allan

This discussion has been closed.