简体   繁体   中英

MathJax html render to pdf

I am trying to make an online quiz application where the user will be presented with a quiz that contains text, images and math equations. I also want the user to be able to print that quiz. I am using MathJax to display the equations.

If the quiz contains just text and images but no math equations, I can use DomPdf to convert the quiz HTML to a PDF and have the user print it.

However, how can I go about creating a PDF that has both the content from the HTML tags in the quiz and the math equations from the quiz rendered by MathJax?

According to this post: http://sourceforge.net/projects/mathjax/forums/forum/948700/topic/3819537 wkhtmltopdf can convert the mathjax if you force a delay on the javascript rendering. I just got finished talking to a guy here: Printing the current page to pdf using wkhtmltopdf about how to get a page saved to pdf using wkhtmltopdf from php. If you put those two things together, I think you can get what you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM