Skip to content

markruler/htmltopdf

Repository files navigation

HTML to PDF

API server to generate PDF from HTML.

Prerequisites

  • Python 3.9+

Usage

Running with Docker

make docker-build
make docker-run

Running locally

python -m venv .venv
source .venv/bin/activate
pip install --no-cache-dir --upgrade -r requirements.txt
playwright install --with-deps # chromium, firefox, webkit, etc.
make run

Running as a background process:

nohup .venv/bin/uvicorn htmltopdf:app --host=0.0.0.0 --port=38000 > /dev/null 2>&1 &

References