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:v1.0.2 <command> [options]
html-to-pdf: Convert HTML (local file or URL) to PDFhtml-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:v1.0.2 html-to-pdf -i /data/index.html -o /data/convert.pdf
Convert a URL:
docker run --rm -v "$(pwd)":/data -w /data pdfix/html-to-pdf:v1.0.2 html-to-pdf -i "https://example.com" -o /data/convert.pdf
To report an issue, contact [email protected].
Content type
Image
Digest
sha256:509922c97…
Size
496 MB
Last updated
about 1 month ago
docker pull pdfix/convert-html-to-pdf