3

I have a webpage which renders LaTeX formula using javascript. I wish to take a screenshot of it programmatically after running the scripts. Is this possible?

dementrock
  • 917
  • 3
  • 9
  • 21

3 Answers3

4

There is a cross platform, HTML5 solution, works with latest browsers only http://html2canvas.hertzen.com/

The script should work fine on the following browsers:

Firefox 3.5+

Google Chrome Newer versions of Opera

IE9 (Older versions compatible with the use of flashcanvas)

Demo: http://html2canvas.hertzen.com/screenshots.html

Community
  • 1
  • 1
Muhammad Usman
  • 12,439
  • 6
  • 36
  • 59
1

You can use webkit2png and apply the delay option to wait for JS to finish rendering the formulae before taking the screenshot.

julesj
  • 754
  • 4
  • 10
0

You can use a headless browser like PhantomJS to render LaTeX / MathJax.

Related How can I force PhantomJS to wait until MathJax is finished?

qwr
  • 9,525
  • 5
  • 58
  • 102