Sign inSign up

pdfix/convert-html-to-pdf

By pdfix

Updated about 1 month ago

Image
0

3.4K

pdfix/convert-html-to-pdf repository overview

HTML to PDF

A Docker image that converts HTML pages to PDF files using headless Chromium.

Table of Contents

Getting started

You need Docker installed. The first run downloads the image and may take longer than later runs.

Usage

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]

Commands

  • html-to-pdf: Convert HTML (local file or URL) to PDF

Arguments

html-to-pdf
OptionRequiredType / expected valueDescription
--input, -iyesURL (https://…) or path to an existing HTML file under the mounted volumePage to convert
--output, -oyesPath for the output .pdf fileOutput PDF
--version, -vnoFlag (no value); prints version and exitsPrint version

Examples

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

Notes

  • The Docker image uses the open-source Chromium package from Debian stable.

Help & support

To report an issue, contact [email protected].

Licenses

Tag summary

Content type

Image

Digest

sha256:509922c97

Size

496 MB

Last updated

about 1 month ago

docker pull pdfix/convert-html-to-pdf