Download Binaries
Self-contained executables require no .NET runtime installed on the machine. Download the binary for your platform from GitHub Releases:
| Platform | Architecture | File | Download |
|---|---|---|---|
| Windows | x64 | eggpdf-cli-win-x64.exe |
↓ Download |
| Windows | ARM64 | eggpdf-cli-win-arm64.exe |
↓ Download |
| Linux | x64 | eggpdf-cli-linux-x64 |
↓ Download |
| Linux | ARM64 | eggpdf-cli-linux-arm64 |
↓ Download |
| macOS | Intel (x64) | eggpdf-cli-osx-x64 |
↓ Download |
| macOS | Apple Silicon (ARM64) | eggpdf-cli-osx-arm64 |
↓ Download |
Make executable (Linux / macOS)
chmod +x eggpdf-cli-linux-x64
# or
chmod +x eggpdf-cli-osx-arm64xattr -dr com.apple.quarantine ./eggpdf-cli-osx-arm64.Basic Usage
Page size, margins, orientation, headers/footers, and document title are all set with
CSS in the HTML file itself (@page rules, position: fixed for
running headers/footers) — not CLI flags. See
Page Layout and Headers & Footers.
# Convert an HTML file to PDF
eggpdf input.html -o output.pdf
# Fetch and render a URL
eggpdf https://example.com -o page.pdf
# Verbose: print render timing and output size to stderr
eggpdf input.html -o output.pdf -vAll Options
| Option | Short | Default | Description |
|---|---|---|---|
--output | -o | required | Output PDF file path, or - for stdout |
--pdfa | — | none | PDF/A conformance level: 1b, 1a, 2b, 2u, 2a, 3b, 3u, or 3a. 1b/1a throw if the document uses opacity, blend modes, or image alpha (PDF/A-1 forbids transparency; it has no u level, only a/b). The a levels require --tagged — see PDF Compliance |
--invoice | — | none | Path to a ZUGFeRD/Factur-X invoice JSON file to embed. Requires --pdfa 3b or --pdfa 3u. Empty/omitted lineItems → MINIMUM profile; non-empty lineItems → EN 16931 (Comfort) profile with computed tax breakdown and totals — see PDF Compliance |
--tagged | — | false | Produce a tagged PDF (structure tree, alt text, /Lang, landmark regions, Link OBJR cross-reference). Combinable with --pdfa and named page groups — see PDF Compliance |
--ua-version | — | 1 | PDF/UA spec version --tagged targets: 1 (ISO 14289-1, PDF 1.7) or 2 (ISO 14289-2:2024, PDF 2.0 — cannot combine with --pdfa). Requires --tagged — see PDF Compliance |
--no-local-files | — | false | Never read local files the HTML references (paths, file: URLs); only data: and http(s) resources load. Each refused file prints a RESOURCE_BLOCKED warning |
--no-private-network | — | false | Fetch http(s) stylesheets, fonts and images safely: refuse loopback, private and cloud-metadata addresses, re-check every redirect, cap size and time. Local files are then read only from the input file's directory (stdin: the current directory; URL input: no local files at all). Use both flags for untrusted HTML — see Untrusted HTML |
--sign-pfx | — | none | Sign the PDF with this PFX/PKCS#12 certificate (RSA or ECDSA key) |
--sign-password-env | — | none | Name of the environment variable holding the PFX password. There is no password flag on purpose: command lines show up in ps and shell history |
--sign-cert / --sign-key | — | none | Sign with a PEM certificate and PEM private key (PKCS#8, RSA, EC, or encrypted PKCS#8); both are required together, and can't be combined with --sign-pfx |
--sign-key-password-env | — | none | Name of the environment variable holding an encrypted --sign-key's password |
--sign-reason / --sign-location / --sign-name | — | none | Signature details; the name defaults to the certificate's subject name |
--verbose | -v | false | Print the page count, render timing and output size to stderr |
--version | — | — | Print version and exit |
--help | -h | — | Show help message and exit |
Non-fatal render warnings are printed to stderr as Warning [CODE]: message (never into the
PDF on stdout) — for example FONT_GLYPH_MISSING when no installed font covers some
characters. See Per-character font fallback.
Piping / stdin
Use - as the input argument to read HTML from standard input. This is ideal for shell pipelines and template engines:
# Pipe HTML directly
echo "<h1>Hi</h1>" | eggpdf - -o out.pdf
# From a template engine
mustache data.json template.html | eggpdf - -o report.pdf
# From curl (remote HTML)
curl -s https://example.com | eggpdf - -o example.pdf
# Heredoc
eggpdf - -o greeting.pdf <<'EOF'
<!DOCTYPE html>
<html><body><h1>Hello, World!</h1></body></html>
EOFCI Examples
GitHub Actions
name: Generate PDF Report
on: [push]
jobs:
pdf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install EggPdf CLI
run: |
curl -L https://github.com/eggspot/EggPdf/releases/latest/download/eggpdf-cli-linux-x64 -o eggpdf
chmod +x eggpdf
- name: Render Report PDF
run: ./eggpdf report.html -o report.pdf
- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: report
path: report.pdf