ghpdf
A CLI tool to convert Markdown files to PDF with GitHub-style rendering.
Installation
pip install ghpdf
Or with pipx (recommended for CLI tools):
pipx install ghpdf
Quick Start
# Convert a file
ghpdf README.md -o output.pdf
# Auto-name output (README.md → README.pdf)
ghpdf README.md -O
Usage
ghpdf [OPTIONS] [FILES]...
Options
| Flag | Long | Description |
|---|---|---|
-o |
--output |
Output filename (single file or stdin only) |
-O |
--remote-name |
Auto-name output (input.md → input.pdf) |
-n |
--page-numbers |
Add page numbers at bottom center |
-q |
--quiet |
Suppress progress output |
-V |
--version |
Show version and exit |
Examples
# Single file with explicit output
ghpdf README.md -o documentation.pdf
# Auto-name output (README.md → README.pdf)
ghpdf README.md -O
# Bulk convert all markdown files
ghpdf *.md -O
# With page numbers
ghpdf report.md -O -n
# Stdin to file
echo "# Hello World" | ghpdf -o hello.pdf
# Stdin to stdout (for piping)
cat document.md | ghpdf > output.pdf
# Quiet mode for scripting
ghpdf *.md -O -q
Features
- GitHub-flavored markdown styling
- Syntax highlighting for code blocks
- Tables, task lists, footnotes, and more
- Page break support
- Optional page numbers
- Bulk conversion
- Stdin/stdout piping
Supported Markdown
Headings, bold, italic, strikethrough, lists, task lists, code blocks, inline code, tables, blockquotes, horizontal rules, links, images, footnotes, definition lists, abbreviations, and admonitions.
Page Breaks
Insert page breaks using any of these formats:
---pagebreak---
<!-- pagebreak -->
\pagebreak
License
MIT
Metadata
Release files for ghpdf 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ghpdf-1.0.0.tar.gz | 38.3 kB | Without provenance | Details for ghpdf-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ghpdf-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for ghpdf-1.0.0-py3-none-any.whl |
Total release size: 46.8 kB
Release files / ghpdf-1.0.0.tar.gz
| Download URL | ghpdf-1.0.0.tar.gz |
|---|---|
| Size | 38.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d486e50e436b58c2100c129f566a729dd7b0da4a6d189717c0c8106cb949832
|
|
BLAKE2b-256 checksum How to use checksums |
787bba1590987ac3bfd98742a4a0b99646e9dae4da39180d7c6df354811e14ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ghpdf-1.0.0-py3-none-any.whl
| Download URL | ghpdf-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4159b605014bbe4e984e7256551426173a3ea66faeec65b0e0e3a7ec8c3991da
|
|
BLAKE2b-256 checksum How to use checksums |
740c534833f1465461ae1add54fab2592f9c504e7b3884d97b0ad364eae253d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ghpdf 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.