Output HTML and MathJax as PDF, in a browser

211 views
Skip to first unread message

Basj

unread,
Nov 23, 2016, 9:57:05 AM11/23/16
to MathJax Users
Hi,

I would like to render into a PDF a page containing some HTML and MathJax.

I'd like to do this on client-side only, no server, thus using Javascript.
I use the nice jsPDF library : https://github.com/MrRio/jsPDF

Unfortunetaly the output is quite weird (see below).
Live demo here : https://jsfiddle.net/c5bz060c/2/

(click on equations to see it happen)


Any idea to make jsPDF work with MathJax?


Thanks!




Peter Krautzberger

unread,
Nov 23, 2016, 10:04:35 AM11/23/16
to mathja...@googlegroups.com
Hi,

I haven't looked at jsPDF in ages but last I checked it had limitations in terms of CSS and SVG support that prevented MathJax rendering from surviving (much like your screenshot).

I see that there's a PR from the maintainer about adding SVG support; that might be worth a look.

Regards,
Peter.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

joseph....@gmail.com

unread,
Nov 23, 2016, 10:08:34 AM11/23/16
to MathJax Users
Thanks for your answer.

Do you know another library that could do produce a PDF on the fly in the browser, with Mathjax content?

Peter Krautzberger

unread,
Nov 23, 2016, 11:19:45 AM11/23/16
to mathja...@googlegroups.com
I'm afraid I don't know but somebody else on the list might.

Regards,
Peter.

On Wed, Nov 23, 2016 at 4:08 PM, <joseph....@gmail.com> wrote:
Thanks for your answer.

Do you know another library that could do produce a PDF on the fly in the browser, with Mathjax content?

--
Reply all
Reply to author
Forward
0 new messages