score:3

Accepted answer

you can see in the mpdf docs: https://mpdf.github.io/html-support/html-tags.html that canvas and script tags are not supported. in the case of charts, most use canvas, you can see that chartsjs also uses canvas to render its charts. https://www.chartjs.org/docs/latest/general/responsive.html

most pdf generator does not support rich html and charts.

i suggest you use phantomjs for generating pdf.

http://phantomjs.org/

http://jonnnnyw.github.io/php-phantomjs/

for pdf: http://jonnnnyw.github.io/php-phantomjs/4.0/3-usage/#output-to-pdf


Related Query

More Query from same tag