Skip to content

max-lt/html-to-pdf

Repository files navigation

Simple API to generate a PDF from HTML

Start the server

With NodeJS

npm install
npm start

With Docker

From GitHub Container Registry build

docker run -p 3000:3000 --rm --name html-to-pdf ghcr.io/max-lt/html-to-pdf:v1.0.0

From local build

docker build -t html-to-pdf .
docker run -p 3000:3000 --rm --name html-to-pdf html-to-pdf

Usage

curl -X POST -H "Content-Type: text/html" --data-binary @input.html http://localhost:3000/html-to-pdf > output.pdf