Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3207 มุมมอง

Hi,
I want to convert HTML to image file how can i do that.
Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,
You can convert html to image file using imgkit package with the following code.

import imgkit
imgkit.from_file(your path to the source file , destination path with image format with file name)

For example

imgkit.from_file("user/downloads/filename.html","user/downloads/filename.jpg")

Regards

อวตาร
ละทิ้ง