Here is a variable html_str, it is a string that contains html tags and contents in body. I am created a .html file from this string using the below code in python.
html_file = open("filename.html", "w")
html_file.write(html_str)
html_file.close()
now i got html file named file "filename.html". Now i want to convert that "filename.html" to a image, named filename.jpg with the exact contents of the html file. please help me.