Md2pdf
Python Markdown to PDF converter
Install / Use
/learn @walwe/Md2pdfREADME
md2pdf: A Python Markdown to PDF Converter
Convert Markdown to PDF using markdown2 and wkhtmltopdf.
Install
Archlinux
Use the provided AUR package
Other Linux Systems
Install the wkhtmltopdf package first
- Debian/Ubuntu
sudo apt install wkhtmltopdf - Others
sudo pip install wkhtmltopdf
And then install md2pdf to your Python environment:
pip install .
or:
python setup.py install
Usage
You can run md2pdf using
- the entry-script
md2pdf - calling the module
python -m md2pdf
md2pdf <markdown-file.md>
md2pdf <markdown-file.md> -o <pdf-file.pdf>
Please run md2pdf --help to find more usage.
Options:
--keep-html / --delete-html Keep or delete intermediate html file
-o, --output PATH Specify output file. Default: <md_file>.pdf
-c, --css PATH Path to CSS file
-w, --wkarg TEXT Additional wkhtml2pdf arguments specified as
--wkargs="--margin-top=0". This option can be
specified multiple times.
--version Show the version and exit.
--help Show this message and exit.
License
MIT licensed as found in the LICENSE file.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
