Markdown to PDF Converter
A command-line tool to convert Markdown files to PDF using Python.
Installation
pip install .
pip install md2pdf-cli
Usage
need to install wkhtmltox from
https://gitlink.org.cn/dnrops/my_tools/releases/download/0.0.1/wkhtmltox-0.12.6-1.mxe-cross-win64.7z
# Basic conversion
md2pdf input.md output.pdf
# With custom CSS
md2pdf input.md output.pdf --style style.css
Sample CSS
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 2cm;
}
h1 { color: #2c3e50; }
h2 { color: #34495e; }
code {
background-color: #f8f8f8;
padding: 2px 4px;
border-radius: 3px;
}
pre {
background-color: #f8f8f8;
padding: 10px;
border-radius: 5px;
overflow-x: auto;
}
md2pdf/
├── setup.py
├── README.md
└── md2pdf/
├── __init__.py
└── cli.py
Release files for md2pdf-cli 0.1.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 | |
|---|---|---|---|
| md2pdf_cli-0.1.0.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| md2pdf_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / md2pdf_cli-0.1.0.tar.gz
| Download URL | md2pdf_cli-0.1.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
198de1c04122465c7f5c17bb1b7faee526119e44f562b0b4f3b92f8df5b8cabe
|
|
BLAKE2b-256 checksum How to use checksums |
0016bbd12e243b668a1c933d06f8e79c02e66cc7ca296e3a8d6acb86c39d013a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0rc2
|
Release files / md2pdf_cli-0.1.0-py3-none-any.whl
| Download URL | md2pdf_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4f05d9f3550e62feba41559a52e5aa75cf34c4a1bcaa00d242c884dbdd9b055
|
|
BLAKE2b-256 checksum How to use checksums |
9844a5846466cc5dc2d18b2e5cbc422480767ee5708758a943f2c504938cd21e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0rc2
|