Skip to content

About

A Docker image that converts HTML pages to PDF files using PDFix SDK and Google Headless Chrome

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

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:latest <command> [options]

Commands

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

Arguments

html-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

Examples

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.pdf

Convert 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

Notes

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

Help & support

To report an issue, contact support@pdfix.net.

Licenses

About

A Docker image that converts HTML pages to PDF files using PDFix SDK and Google Headless Chrome

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages