vgalin / html2image

A package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.
MIT License
344 stars 44 forks source link

getting blank image after setting 'temp_path' #143

Open Lee-7723 opened 5 months ago

Lee-7723 commented 5 months ago
from html2image import Html2Image

render = Html2Image(browser='edge', output_path='./tmp', temp_path='./tmp', keep_temp_files=True)
img_path = render.screenshot(html_str='hello world', save_as=f'test.png')[0]
print(img_path)

this code gives me an blank png. if i remove temp_path='./tmp' then it's fine. if i give it an absolute path it seems work as well. so im guessing this doesn't support relative path?