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-arm64On 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.Install as a dotnet Tool
If you have the .NET SDK installed, install EggPdf as a global dotnet tool — no binary download needed:
dotnet tool install -g dotnet-eggpdfAfter installation, the eggpdf command is available globally:
eggpdf --versionUpdate to the latest version:
dotnet tool update -g dotnet-eggpdfBasic Usage
# Convert an HTML file to PDF
eggpdf input.html -o output.pdf
# Specify page size
eggpdf input.html -o output.pdf --page-size Letter
# Add a footer with page numbers
eggpdf input.html -o output.pdf --footer "Page {page} of {pages}"
# Add a header
eggpdf input.html -o output.pdf --header "My Company — Confidential"
# Custom margins (top right bottom left, in CSS pixels)
eggpdf input.html -o output.pdf --margin 60 50 60 50
# Set document title
eggpdf input.html -o output.pdf --title "Annual Report 2025"All Options
| Option | Short | Default | Description |
|---|---|---|---|
--output | -o | required | Output PDF file path |
--page-size | — | A4 | Page size: A3, A4, A5, Letter, Legal |
--margin | — | 40 40 40 40 | Margins in px: top right bottom left |
--title | — | — | PDF document title metadata |
--header | — | — | Header template. Supports {page}, {pages} |
--footer | — | — | Footer template. Supports {page}, {pages} |
--landscape | — | false | Render in landscape orientation |
--verbose | -v | false | Print render statistics to stderr |
--version | — | — | Print version and exit |
--help | -h | — | Show help message and exit |
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
.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 --footer "Page {page} of {pages}"
- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: report
path: report.pdf