# mdpdf
A fast CLI tool to convert Markdown files to PDF.
## Installation
### From crates.io (Recommended)
```bash
cargo install mdpdf
```
### From source
```bash
git clone https://github.com/yourusername/mdpdf.git
cd mdpdf
cargo install --path .
```
## Usage
### Basic usage
Convert a Markdown file to PDF:
```bash
mdpdf document.md
```
This will create `document.pdf` in the same directory.
### Specify output file
Use the `-o` or `--output` flag to specify a custom output path:
```bash
mdpdf document.md -o output.pdf
```
### Examples
```bash
# Convert README.md to README.pdf
mdpdf README.md
# Convert with custom output name
mdpdf notes.md -o formatted-notes.pdf
# Convert to a different directory
mdpdf report.md -o ~/Documents/report.pdf
```
## Features
- 🚀 **Fast** - Efficient Markdown to PDF conversion
- 📝 **Simple** - Clean, intuitive CLI interface
- 🎨 **Clean output** - Suppresses verbose font loading messages
- 🔧 **Flexible** - Custom output paths or automatic naming
- 📦 **Cross-platform** - Works on macOS, Linux, and Windows
## Requirements
- Rust 1.70 or later (for installation from source)
- No additional system dependencies required
## How it works
`mdpdf` uses the `markdown2pdf` crate to convert Markdown content to PDF format. It automatically handles font selection and provides clean, readable PDF output.
## License
Licensed under either of:
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## Acknowledgments
Built with:
- [markdown2pdf](https://crates.io/crates/markdown2pdf) - Markdown to PDF conversion
- [clap](https://crates.io/crates/clap) - Command-line argument parsing