I am looking for a way to export my data table to a PDF file using Angular Material. I have tried using jsPDF but it seems to only work with static data. Is there a way to export my dynamic DataTable content to a PDF file?
Below is the HTML source code for my DataTable:
(insert your HTML DataTable code here)
In my component.ts file, I am fetching data and populating my DataTable like this:
(insert your component.ts code snippet here)
I have attempted to use jsPDF to download the DataTable as a PDF:
(insert your downloadPdf() function code here)
However, when I try to generate the PDF, it only includes the header and the body content is displayed as an array. The PDF does not display the actual data from the DataTable. How can I ensure that the PDF includes all the data elements correctly?
For example, the content of the PDF should look like this:
(Insert an example of how the PDF content should look like here)