Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 511 Bytes

File metadata and controls

18 lines (13 loc) · 511 Bytes

Python Pyppeteer HTML to image

A simple script to convert HTML files to images (PNG, JPG) or to PDF

Getting started

You need to clone this project and then install the dependencies (Pyppeteer):

pip3 install -r requirements.txt

Then simply run the given script from the command line:

./convert.py <input.html> <output.png>

A PNG file will be created in the current directory. If you simply change output file extension from .png to .jpg or .pdf you have a different output file.