Skip to content

StixoTvorec/py-html2pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-html2pdf

Installation

python3 -mvenv venv

source venv/bin/activate

pip install -r requirements.txt

Use as server:

Start

gunicorn --bind 127.0.0.1:8082 --threads 4 app.server:app

# or (for develop)

python debug.py --bind 127.0.0.1:8082 --debug

Then

curl -X POST -F "html=@archive.zip" http://127.0.0.1:8082 -o out.pdf

Use as cli converter:

pip install tqdm  # optional for progress bar

python cli.py path/page-one.html path/page-two.html [...]

# OR

python cli.py --input templates-list.txt  # read from file. Each line as html page

# See help:

python cli.py --help