Forum How do I...?

Google Charts

27escape
Hi, I am trying to use google charts (https://developers.google.com/chart/ - not the old version that generated images/pngs)

I run

prince --javascript --input=html5 --media=print timeline-test.html -o timeline-test.pdf

and get the output

prince: warning: document.write is not yet supported
prince: timeline-test.html:20: error: unexpected token int(3)

Is this something that will be supported in the future/has an easy work around?

Many thanks
  1. timeline-test.html1.8 kB
    timeline test file
mikeday
I think this will require generating the chart outside of Prince, eg. with PhantomJS or similar.
27escape
thanks, I was hoping to reduce my reliance on third-party tools, I think for the corecharts they can be printed with a bit of extra work, but the timeline one cannot at the moment, which is a shame.

Looks like I may have to re-purpose my ploticus chart generator!
27escape
Just wondering if fixing document.write is on the roadmap or not?

thanks
mikeday
One day, but probably not this year, as it requires complex interaction between the JavaScript execution and the HTML parser.
27escape
OK thanks for the update.

PhantomJS may be the answer for me then, seems to be the main suggestions on various forums :)