Is there a way to take a screenshot using PIL of an specified HTML/Javascript page that resides on my server?
I want to write a script that will change some parameters on that HTML page and then have PIL take screenshots of it.
Any ideas? Examples would be truly appreciated.
Do you absolutely have to use PIL? If not you might be able to get what you want using PyQT which has a built-in Webkit control.
See http://notes.alexdong.com/xhtml-to-pdf-using-pyqt4-webkit-and-headless for an example which converts html+css into a PDF without using a separate browser. The code is pretty short so I’ve copied it below.