Here's my situation. I have to make a report with graphs. I have already successfully created graphs (bar, pie, and line) using ChartJS and displayed them in my page. However, I want to put a "print" button which, when clicked, will generate a pdf containing all of the graphs created.
For my other pages (which are only forms), I have used TCPDF and it's working well. However, I can't use it again for the graphs because what I produced are widgets placed in div elements.
My plan is to convert the contents of these div elements (the graphs) into an image so I can insert it in TCPDF.
Is there a way for me to convert the contents of the div into an image?
I can't use canvas.toDataURL() like in this link because ChartJS puts their graphs in a DIV element and NOT canvas. I also found out I can't put div inside a canvas (see link).
Please help me (T^T)