A user-friendly tool for converting Markdown to PDF
Project description
A user-friendly tool for converting Markdown to PDF
Installation
pip install md2pdf-python
Usage
Use in CMD
md2pdf --help
md2pdf tests/demo.md -o tests/output-default.pdf
md2pdf tests/demo.md -o tests/output-default.pdf --html
md2pdf tests/demo.md -o tests/output-styles.pdf --css-file tests/demo.css --mermaid-config tests/demo.json
Use in Python
from md2pdf.core.converter import MD2PDF
md2pdf(input_file='input.md', output_file='output.pdf')
md2pdf(input_file='input.md', output_file='output.pdf', html=True)
md2pdf(input_file='input.md', output_file='output.pdf', css_file='custom.css')
md2pdf(input_file='input.md', output_file='output.pdf', css_file='custom.css', mermaid_config='custom-config.json')
mermaid render is based on Mermaid-CLI (mmdc), install it with:
npm install -g @mermaid-js/mermaid-cli
Demo
- INPUT: demo.md
- OUTPUT-DEFAULT: output-default.pdf
- OUTPUT-STYLES: output-styles.pdf
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_python-1.0.0.tar.gz
(6.7 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_python-1.0.0.tar.gz.
File metadata
- Download URL: md2pdf_python-1.0.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b52c87b0984e76c0d0f515c7d7b3dfa272abb0b759eaa1ff886018cdf6249600
|
|
| MD5 |
69bf54d601de1a950b9c521f4d0c2055
|
|
| BLAKE2b-256 |
575dc5c91df59e8ee366fb5d963b265165a06f0c058d669062db1e310daf9c79
|
File details
Details for the file md2pdf_python-1.0.0-py3-none-any.whl.
File metadata
- Download URL: md2pdf_python-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
741e9daec1cf12a3990fe37c52947d592ce95395a8682d51b5b5c7404ad21d31
|
|
| MD5 |
365888e20edb0e692526d3e0567ab6cd
|
|
| BLAKE2b-256 |
bb5e541e713c75b420369caab16aab1d29675c912803fc71b10c5a4b6d692a06
|