I what to render this HTML page into jpg:
but wkhtmltoimage seems to only render the small part of the page.

what's wrong with my code?
My code:
import imgkit
map0 = folium.Map(location=Center,tiles='Stamen Toner',zoom_start=12)
map0.save("SVI_Map.html")
config = imgkit.config(wkhtmltoimage='C:Program Files\\wkhtmltopdf\\bin\\wkhtmltoimage.exe')
with open("SVI_Map.html") as f:
imgkit.from_file(f, 'out.jpg',config=config)

I found an alternative solution as I discovered the the problem is with wkhtmltoimage, which is basically what imgkit uses to render the image from the HTML. Firstly, this uses the pyppeteer library, which is a python port of puppeteer. You can install it using pip:
In my implementation I used async because I do not want this process to "block" other parts of my application.
Firstly make sure to import the following:
This code below is used to render the HTML and take a "screenshot". Just copy and paste it, and it should work. Feel free to let me know if you have any more questions about this code