title: Generate pdf on the fly with charts
body: <p>I need to generate PDF report on the fly and somehow insert a image version of a Chart.</p>
  
  <p>As a resume, I'm using Yii2, mpdf extension from Kartik (<a href="http://demos.krajee.com/mpdf" rel="nofollow">http://demos.krajee.com/mpdf</a>), and amCharts.</p>
  
  <p>I know both amCharts and HighCharts, have ways to export the graph as images on the fly, but for that I need JavaScript to render, and as far as I know, there isn't a way to render HTML to PDF, and load JavaScript to execute something. MPDF Supports HTML, CSS, etc, but afaik NOT JavaScript.</p>
  
  <p>This was a feature by a client, which gave me a link to a private app (that all I know runs on PHP), that is accomplishing this with HighCharts, I don't mind swapping to HighCharts if there is a way I'm missing..</p>
  
  <p>I need to render my view, into PDF and attach a dynamically generate amCharts as a image in my PDF.</p>
  
  <p>Out-of-the-box ideas are welcome, as this needs to be made, even if it's with some sloppy, lame way.</p>
  
  <p>But I really I'm not seeing how..</p>
  
  <p>Thanks in advance.</p>