pdf export function without defining button

pdf export function without defining button

bilal001bilal001 Posts: 1Questions: 1Answers: 0

Hi, I want the function that exports a table as pdf without creating button when initializing the dataTable so I can call it when the user clicks on another button that I created on the website.

Answers

  • allanallan Posts: 61,732Questions: 1Answers: 10,110 Site admin
    edited August 2018

    Use button().trigger().

    Allan

    edit That requires that you have a PDF export button on the page (it could be hidden). If you don't want the button at all, you'd need to extract the pdf export part of the code form the library. Its MIT licensed, so you are free to do so.

This discussion has been closed.