Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3212 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ