Forum How do I...?

Native Prince equivalent of DocRaptor's docraptorJavaScriptFinished() ?

danderson
We just transitioned from using DocRaptor to our own installation of Prince, and discovered that some of our pdf conversions are missing Google Charts. This was previously accomplished by using the docraptorJavaScriptFinished() function, which would return true when the Google Charts were fully loaded. What is the correct way to accomplish this natively in Prince?

TIA
wezm
danderson
Still hoping for an answer to my question.
mikeday
DocRaptor supports its own JavaScript solution as well as that built into Prince, and the JavaScript in Prince runs synchronously until it completes, so if the Google Chart isn't rendering then there may be some other issue like an unsupported DOM interface. Are any errors or warnings appearing in the output log?
danderson
thanks for the reply. I turned on verbose logging, and I can see where the google charts scripts loaded successfully and everything, but there are no errors or warnings about it. The chart in my report simply doesn't get rendered as it does in DocRaptor.
mikeday
Thanks, we are investigating this issue.
danderson
Have you found anything, Mike?
mikeday
Sorry, we are still looking. There are some methods that need to be stubbed such as Object.freeze and Object.isFrozen, but even after that the main callback is not being called, so there must be some other issue with asynchronous code that we haven't found yet.
mikeday
We've tracked down further issues and even got some pie charts to render but there are issues with sizing and labels getting cut off, so clearly more work remains to be done.
mikeday
We are still working on this and making progress but due to the nature of the task it is impossible to give a timeframe for when Google Charts will work in its entirety; we will keep it on the roadmap and return with updates as we have them.