我如何将此 HTML 页面呈现为 jpg:
但 wkhtmltoimage 似乎只呈现页面的一小部分。
我的代码有什么问题?
我的代码:
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)