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
354 stars 43 forks source link

Incorrect css loading it seems #64

Closed svidler closed 2 years ago

svidler commented 2 years ago

Hi Vgalin, not entirely sure If I am doing something wrong or if css isn't loaded correctly.

I have "messages.html" file (actually like 100 of them, I have exported one chat from Telegram, and was trying to automate making screenshots). "style.css" is located at path "css\style.css" from the messages file. So I'm running it as: hti.screenshot( html_file='messages.html', css_file='css\style.css', save_as='aaatest.jpg' )

The html2image does work - it produces image file, however - instead of looking more&less as the original html+css - it's just black text on grey background.

Attaching html2image result and manually made screenshot.

Would be very grateful if you could point me to my issue. Thank you in advanc h2i_res man_screen e