Skip to main content
Version: 6.x


Gotenberg provides the endpoint /convert/markdown for Markdown conversions.

It accepts POST requests with a multipart/form-data Content-Type.


Markdown conversions work the same as HTML conversions.

Only difference is that you have access to the Go template function toHTML in the file index.html. This function will convert a given markdown file to HTML.

For instance:

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>My PDF</title>
{{ toHTML .DirPath "" }}
curl --request POST \
--url http://localhost:3000/convert/markdown \
--header 'Content-Type: multipart/form-data' \
--form files=@index.html \
--form \
-o result.pdf