A web service for converting markdown to PDF
For quick experimentation, you can use the web version. Just paste your markdown and download the converted PDF.
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)"
A prebuilt container image is available at Docker Hub. You can run it yourself like this:
docker run --publish=8000:8000 spawnia/md-to-pdf