Rust MIT

md-to-pdf

A web service for converting Markdown to PDF

S

spawnia

Dernière activité 2 sept. 2026
spawnia/md-to-pdf

170

étoiles

28

forks

0

issues ouvertes

markdownmarkdown-converterpandocpdfpdf-generator

Ce README est souvent en anglais.

md-to-pdf

A web service for converting Markdown to PDF

Sponsors

If you make money using this project, please consider sponsoring its maintainer on GitHub Sponsors.

Web UI

For quick experimentation, you can use the web version hosted on Fly.io. Paste your Markdown and download the converted PDF.

Availability of the service is not guaranteed, see Fly.io status when it is down. If you need guaranteed availability, deploy it yourself.

API

You can convert Markdown by sending a POST request to https://md-to-pdf.fly.dev.

curl --data-urlencode 'markdown=# Heading 1' --output md-to-pdf.pdf https://md-to-pdf.fly.dev
Parameter Required Description
markdown Required The markdown content to convert
css Optional CSS styles to apply
engine Optional The PDF conversion engine, can be weasyprint, wkhtmltopdf or pdflatex, defaults to weasyprint

Send data from files like this:

curl --data-urlencode "markdown=$(cat example.md)" 

Deploy

A prebuilt container image is available at Docker Hub. The container starts up the web service and listens for HTTP on port 8000.

You can run it yourself like this:

docker run --publish=8000:8000 spawnia/md-to-pdf

You may configure the webserver through Rocket environment variables. For example, you could allow larger payloads by increasing the limit for form data:

ROCKET_LIMITS={form="1MiB"}

Built with

Projets similaires

A markdown to pdf transpiler in pure Rust

Rustmarkdownmarkdown-to-pdfmarkdown2pdf
Ttheiskaa
237 étoiles17

Python tool for converting files and office documents to Markdown.

Pythonautogenautogen-extensionlangchain
Mmicrosoft
187,5 k étoiles13,9 k

A PDF to Markdown converter

JavaScriptmarkdownpdf-converter
Jjzillmann
1,7 k étoiles299