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?
Asked
Active
Viewed 1,655 times
3
-
2May be this will help: http://stackoverflow.com/questions/60455/take-a-screenshot-of-a-webpage-with-javascript – Naveed Dec 23 '11 at 11:28
-
@NAVEED Can it be done in linux? – dementrock Dec 23 '11 at 11:36
3 Answers
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)

Community
- 1
- 1

Muhammad Usman
- 12,439
- 6
- 36
- 59
-
-
Give it a try I think it might be possible, I am afraid you may not find any better solution. – Muhammad Usman Dec 23 '11 at 11:59
-
I want to, for example, take a screenshot of the formula on the index page of mathjax: http://www.mathjax.org/ and it failed. – dementrock Dec 23 '11 at 12:08
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