A command-line tool to convert Markdown files to PDF
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
md2pdf_cli-0.1.0.tar.gz
(3.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md2pdf_cli-0.1.0.tar.gz.
File metadata
- Download URL: md2pdf_cli-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0rc2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
198de1c04122465c7f5c17bb1b7faee526119e44f562b0b4f3b92f8df5b8cabe
|
|
| MD5 |
072495f2f3d1b611e2556d9f3b489b78
|
|
| BLAKE2b-256 |
0016bbd12e243b668a1c933d06f8e79c02e66cc7ca296e3a8d6acb86c39d013a
|
File details
Details for the file md2pdf_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: md2pdf_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0rc2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4f05d9f3550e62feba41559a52e5aa75cf34c4a1bcaa00d242c884dbdd9b055
|
|
| MD5 |
e7382a220b16a904d1007762582fb703
|
|
| BLAKE2b-256 |
9844a5846466cc5dc2d18b2e5cbc422480767ee5708758a943f2c504938cd21e
|