Markdown2pdf – pure md to pdf transpiler implementation in Rust
a day ago
- #rust
- #markdown
- #pdf-conversion
- markdown2pdf is a command-line tool and library for converting Markdown to PDF.
- It uses a lexical analyzer to parse Markdown and a PDF module for document generation.
- Supports customization of fonts, colors, spacing, and typographic properties via TOML configuration.
- Available as both a binary and a library, built in Rust for performance and memory safety.
- Handles comprehensive Markdown syntax including headings, lists, code blocks, links, and images.
- Installation options include Homebrew, Cargo, and prebuilt binaries for various platforms.
- Command-line usage supports file paths, direct string content, and URLs as input.
- Library functions include parse_into_file() and parse_into_bytes() for flexible PDF generation.
- Configuration can be default, file-based, or embedded for self-contained executables.
- Advanced usage allows direct interaction with lexer and PDF generation components.
- Error handling is graceful, falling back to default styling if configuration issues arise.