# Install htmldoc with Homebrew, apk, apt, MacPorts, Nix, pacman, zypper

Convert HTML to PDF or PostScript. Version 1.9.23 via Homebrew; verified 2026-07-29. Also installable with debian: sudo apt install htmldoc.

## Install

```sh
sudo av install brew:htmldoc
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install htmldoc
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install htmldoc
```

  Evidence: MacPorts ports tree: textproc/htmldoc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add htmldoc
```

  Evidence: Alpine Linux edge package indexes: htmldoc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install htmldoc
```

  Evidence: Debian stable package indexes: htmldoc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#htmldoc
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ht/htmldoc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S htmldoc
```

  Evidence: Arch Linux sync databases: htmldoc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install htmldoc
```

  Evidence: openSUSE Tumbleweed package metadata: htmldoc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## Package facts

- **Package key:** brew:htmldoc
- **Package manager:** Homebrew
- **Version:** 1.9.23
- **Source summary:** Convert HTML to PDF or PostScript
- **Homepage:** <https://www.msweet.org/htmldoc/>
- **Repository:** <https://github.com/michaelrsweet/htmldoc>
- **Last updated:** 2026-07-29T14:13:06+09:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- htmldoc (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.9.23
## Project history and usage

HTMLDOC is Michael R Sweet's long-lived converter for turning HTML and Markdown source files or web pages into EPUB, PostScript, PDF, or indexed HTML output with an optional table of contents. It matters in package-manager culture because it preserves an older documentation-generator workflow: small static HTML goes in, printable documents come out, and the tool can be used from a GUI, a CLI, CI jobs, or web-server/reporting pipelines.

### Project history

The upstream README says HTMLDOC was developed in the 1990s as a documentation generator for Sweet's previous company and later saw substantial use as a report generator embedded in web servers. The project site describes the same core job as converting HTML and Markdown sources or web pages to paged and ebook-oriented output formats.

The source tree carries an older `release-1.8b4` tag dated 1999 and a long 1.8/1.9 tag line, showing a package with pre-GitHub roots that was later preserved in a public Git repository. The release notes and site also document the deliberate limitations that shaped its evolution: useful for documentation, invoices, and reports, but not a general modern browser engine with full CSS, forms, Unicode, or emoji support.

### Adoption history

The input package facts record HTMLDOC in Homebrew, Debian, Ubuntu, MacPorts, Nix, Arch, Alpine, and openSUSE-style packaging. That breadth fits a utility that is often installed by documentation build systems or server-side report generators rather than by end users seeking a full browser-to-PDF stack.

### How it is used

HTMLDOC is used where relatively simple HTML or Markdown needs deterministic printable output: manuals, internal documentation, invoices, reports, and table-of-contents-based documents. Its appeal is the narrow converter surface: it can be automated from the command line while also offering a GUI for manual jobs.

### Why package nerds care

For package nerds, HTMLDOC is interesting because it is an old-school Unix packaging survivor. It predates the headless-Chromium era, keeps a focused paged-output model, and remains small enough to package widely as a standalone converter instead of pulling in a browser runtime.

### Timeline

- 1990s: HTMLDOC was developed as a documentation generator for Michael R Sweet's previous company.
- 1999: The public Git history includes the `release-1.8b4` tag.
- 2011-2024: Runtime version text in issue output identifies the 1.9 line as GPL software maintained by Michael R Sweet across that period.
- 2026: The GitHub repository includes the `v1.9.23` tag for the continuing 1.9 series.
- Package-manager era: The input package facts record HTMLDOC across Homebrew, Debian, Ubuntu, MacPorts, Nix, Arch, Alpine, and zypper-family packaging.

### Related projects

- HTMLDOC is related to other document converters and paged-output generators, but it occupies a narrower historical lane than browser-based HTML-to-PDF tools. Its closest package-manager neighbors are converters such as wkhtmltopdf, Pandoc, and headless-browser wrappers, while its design lineage is closer to static documentation and report generation.

### Sources

- <https://api.github.com/repos/michaelrsweet/htmldoc/commits/2de07fe97da08de65f1284c8497b90cfaa24d9eb>
- <https://api.github.com/repos/michaelrsweet/htmldoc/commits/91cd814cbad259669c9b3e768e8a15fc1c6c156e>
- <https://api.github.com/repos/michaelrsweet/htmldoc/tags?per_page=100>
- <https://github.com/michaelrsweet/htmldoc>
- <https://github.com/michaelrsweet/htmldoc/releases>
- <https://www.msweet.org/htmldoc/>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Other Package-Manager Records

- Debian apt - htmldoc - 1.9.20-1: normalized package name match | Debian stable package indexes: htmldoc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | HTML processor that generates indexed HTML, PS, and PDF | https://www.msweet.org/htmldoc/
- Debian apt - htmldoc-common - 1.9.20-1: normalized package name match | Debian stable package indexes: htmldoc-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Common arch-independent files for htmldoc | https://www.msweet.org/htmldoc/
- Nix - htmldoc: normalized package name match | nixpkgs package indexes: pkgs/by-name/ht/htmldoc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - htmldoc - 1.9.17-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: htmldoc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | HTML processor that generates indexed HTML, PS, and PDF | https://www.msweet.org/htmldoc/
- Ubuntu apt - htmldoc-common - 1.9.17-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: htmldoc-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Common arch-independent files for htmldoc | https://www.msweet.org/htmldoc/
- apk - htmldoc - 1.9.23-r0: normalized package name match | Alpine Linux edge package indexes: htmldoc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | HTML conversion software | https://www.msweet.org/htmldoc/
- apk - htmldoc-doc - 1.9.23-r0: normalized package name match | Alpine Linux edge package indexes: htmldoc-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | HTML conversion software (documentation) | https://www.msweet.org/htmldoc/
- pacman - htmldoc - 1.9.23-2: normalized package name match | Arch Linux sync databases: htmldoc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | HTML Conversion Software | https://www.msweet.org/htmldoc/
- zypper - htmldoc - 1.9.23-1.6: normalized package name match | openSUSE Tumbleweed package metadata: htmldoc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | HTML Processor that Generates HTML, PostScript, and PDF Files | https://michaelrsweet.github.io/htmldoc/index.html
- MacPorts - htmldoc: normalized package name match | MacPorts ports tree: textproc/htmldoc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/htmldoc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/htmldoc.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
