A Docker image that converts HTML pages to PDF files using headless Chromium.
You need Docker installed. The first run downloads the image and may take longer than later runs.
Mount a folder into the container and run a subcommand:
docker run --rm -v "$(pwd)":/data -w /data pdfix/html-to-pdf:latest <command> [options]html-to-pdf: Convert HTML (local file or URL) to PDF
| Option | Required | Type / expected value | Description |
|---|---|---|---|
--input, -i |
yes | URL (https://…) or path to an existing HTML file under the mounted volume |
Page to convert |
--output, -o |
yes | Path for the output .pdf file |
Output PDF |
--version, -v |
no | Flag (no value); prints version and exits | Print version |
Convert a local HTML file:
docker run --rm -v "$(pwd)":/data -w /data pdfix/html-to-pdf:latest html-to-pdf -i /data/index.html -o /data/convert.pdfConvert a URL:
docker run --rm -v "$(pwd)":/data -w /data pdfix/html-to-pdf:latest html-to-pdf -i "https://example.com" -o /data/convert.pdf- The Docker image uses the open-source Chromium package from Debian stable.
To report an issue, contact support@pdfix.net.
- Chromium (BSD-style license)