How to take a screenshot of a webpage after running javascript

I have a webpage that displays a LaTeX formula using javascript. I want to take a screenshot programmatically after running the scripts. Is it possible?

+4
source share
2 answers

You can use webkit2png and apply the delay parameter to wait for JS to finish rendering the formulas before taking a screenshot.

+1
source

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

The script should work fine in the following browsers:

Firefox 3.5+

Google Chrome New Versions of Opera

IE9 (older versions compatible with flashcanvas)

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

+4
source

Source: https://habr.com/ru/post/1387729/


All Articles