⚡ Markdown to PDF conversion, for agents. ⚡
Agents speak Markdown. Humans prefer PDF. Bridge the gap for the final stage of your agentic workflow. No sign-ups, no credit cards, just sats for bytes.
Read the full documentation at markdown2pdf.ai
Here’s the output of a markdown file converted to PDF format, showing cover page, table of contents and table support. Our engine is powered by LaTeX rather than HTML to PDF conversion as many other libraries and services use, which results in a much higher quality, print-ready output.
This package provides a python client for the markdown2pdf.ai service. You can read full instructions in our documentation.
Installation
pip install markdown2pdf-python
Usage
from markdown2pdf import MarkdownPDF
def pay(offer):
print("⚡ Lightning payment required")
print(f"Amount: {offer['amount']} {offer['currency']}")
print(f"Description: {offer['description']}")
print(f"Invoice: {offer['payment_request']}")
input("Press Enter once paid...")
client = MarkdownPDF(on_payment_request=pay)
path = client.convert(markdown="# Save this one", title="My document title", download_path="output.pdf")
print("Saved PDF to:", path)
Metadata
Release files for markdown2pdf-python 0.2.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 | |
|---|---|---|---|
| markdown2pdf_python-0.2.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| markdown2pdf_python-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / markdown2pdf_python-0.2.0.tar.gz
| Download URL | markdown2pdf_python-0.2.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fd6d3a2de93c223860279d516987a3fe230287ac0af17d5296100da3c013975
|
|
BLAKE2b-256 checksum How to use checksums |
82d44b39e21c473e1c90264d5a600e0be4fa276463a4bdaa54bb3f848e3b2524
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.5
|
Release files / markdown2pdf_python-0.2.0-py3-none-any.whl
| Download URL | markdown2pdf_python-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7793364d5ea3b8173df86fc720efebb854b83e899de38f5a658b6d88876ef4a
|
|
BLAKE2b-256 checksum How to use checksums |
1201512f6c4415e8d6d38704ae194f2f10bae5355e2025c501cf4c3ab6a65a73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.5
|