Download Binaries

Self-contained executables require no .NET runtime installed on the machine. Download the binary for your platform from GitHub Releases:

PlatformArchitectureFileDownload
Windowsx64 eggpdf-cli-win-x64.exe ↓ Download
WindowsARM64 eggpdf-cli-win-arm64.exe ↓ Download
Linuxx64 eggpdf-cli-linux-x64 ↓ Download
LinuxARM64 eggpdf-cli-linux-arm64 ↓ Download
macOSIntel (x64) eggpdf-cli-osx-x64 ↓ Download
macOSApple Silicon (ARM64) eggpdf-cli-osx-arm64 ↓ Download

Make executable (Linux / macOS)

chmod +x eggpdf-cli-linux-x64
# or
chmod +x eggpdf-cli-osx-arm64
⚠️
On macOS, you may need to allow the binary in System Settings → Privacy & Security after the first run, or run xattr -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 -v

All Options

OptionShortDefaultDescription
--output-orequiredOutput PDF file path, or - for stdout
--pdfa—nonePDF/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—nonePath 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—falseProduce 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—1PDF/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—falseNever 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—falseFetch 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—noneSign the PDF with this PFX/PKCS#12 certificate (RSA or ECDSA key)
--sign-password-env—noneName 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—noneSign 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—noneName of the environment variable holding an encrypted --sign-key's password
--sign-reason / --sign-location / --sign-name—noneSignature details; the name defaults to the certificate's subject name
--verbose-vfalsePrint 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>
EOF

CI Examples

GitHub Actions

.github/workflows/generate-pdf.yml
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