Markdown to PDF
The parameters are consistent with the main HTML to PDF interface. The additional parameter markdown is used to specify certain Markdown parameters and can be adjusted as needed.
- API Endpoint: http://127.0.0.1:8080/md-to-pdf
- Try Online: md-to-pdf
Parameters
| Name | Type | Required | Description | Default |
|---|---|---|---|---|
| markdown | Object | No | Image Options (Enterprise Edition) | |
| flavour | String | No | Flavour (GFM SFM COMMON) | COMMON |
Request Body
{
"id": "43eaf69a-194a-4c0f-8e38-726f09eb24ba",
"text": "# bkhtmltopdf \n hello, world!",
"pdf": {
"footerTemplate": "",
"headerTemplate": "",
"displayHeaderFooter": false,
"generateTaggedPdf": true,
"generateDocumentOutline": true
},
"options": {
"waitUntil": "load"
},
"markdown": {
"flavour": "GFM"
}
}
Response Body
The API returns a PDF stream (Content-Type: application/pdf), which can be directly displayed or saved in a
browser or HTTP client.