3
votes

I'm using c3.js (http://c3js.org/) and wkhtmltopdf (http://wkhtmltopdf.org/) to generate a PDF of the HTML page my chart lives on. My chart displays fine in the browser but is blank in wkhtmlpdf. Wkhtmltopdf reports no Javascript errors but the resulting PDF does not include the chart. Does anyone have a work around for this?

/wkhtmltopdf --javascript-delay 5000 "http://c3js.org/samples/chart_donut.html" ~/test.pdf

test.pdf

1
Did you already find a solution for this?Royw
Not yet, I ended up implementing my charts using D3 instead of C3Jeff K
@Royw, answer is now below.Jeff K

1 Answers

-1
votes

Upgrade to the latest version or there are a few workarounds explained here https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1964 which appear to have resolved this issue.