Forum Feature requests

Javascript engine?

Stefan
Inclusion of a Javascript engine could make this software truly spectacular. In my case, I use Javascript plus CSS to process TeX equations in the web page, create randomized tests, automate a lot of the mundane html/CSS markup (tables, etc) include graphs using the canvas tag, and so on. Any chance that this is being considered?
mikeday
Yes, we are working on this.
Stefan
Excellent news!
typesend
Which JavaScript flavor are you working on integrating?
mikeday
ECMAScript 3 first, then parts of ECMAScript 5.
Yardboy
NEVER MIND

Didn't even realize MathML was supported in the Prince engine - thanks so much!

--------------------

Any updates on delivery of a javascript engine in Prince? We're using MathJax to properly display MathML data and would like to be able to get that into our PDF output.

Thanks.
whit537
This sounds great. Are you looking at V8?

It would be especially hot to bundle jQuery, or at least Sizzle.js.
mikeday
We are testing Prince with jQuery, but are not planning on bundling it at the moment, as it can be accessed via HTTP or cached locally by the user.
spacetc62
If you need to use Prince with Javascript right now, you can always try out DocRaptor (http://docraptor.com), a web service that converts html to pdf using Prince. They just added support for running javascript before passing off the html to Prince to render to PDF (http://docraptor.com/documentation#api_javascript).
whit537
@mikeday: Sweet!

@spacetc62: Good tip. I've got a Python pipeline going atm and may be able to achieve my dreams with some further pre-processing. Will keep the DocRaptor option on the radar.
mikeday
We have released the first beta of Prince 8.0, which includes JavaScript support. Parts of jQuery work, MathJax doesn't yet work, as we still lack a couple of HTML DOM features.
mikeday
Prince 9 is out now, which has faster JavaScript, more DOM features, and supports the canvas element and API. We still can't run every script on the web, but we'll keep working on it. :)
mikeday
The latest build of Prince now supports MathJax 3, as demonstrated here. :)