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

The screenshot of page is not full page #155

Open nvkhoa0108 opened 2 months ago

nvkhoa0108 commented 2 months ago

Hi,

I got a problem when I render image using Html2Image. The screenshot of page is not full page. It has blank in end page. Please help me solve this problem. Thanks!

blank_not_fullpage

vgalin commented 2 months ago

Hey, could you provide the code you're using to generate this screenshot?

nvkhoa0108 commented 2 months ago

Hi Vglin, Here is my code:

from html2image import Html2Image
hti = Html2Image(output_path = r'E:/wdir/python/vnpt_qni/src/tmp/', browser="chrome", custom_flags=["--no-sandbox",], temp_path=r'E:\wdir\python\vnpt_qni\src\tmp')
print(hti.browser)
print(hti.size)
hti.screenshot(url='https://www.geeksforgeeks.org/how-to-render-html-to-an-image/', save_as= 'test.png')

Currently , I'm using Html2image version 2.0.3, I try to upgrade to 2.0.4.3 but I still met the same problem. However I use others computer that is work fine.
image

satheler commented 1 month ago

Any updates on this case? I'm experiencing the same issue 😞