Skip to main content

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.

Parameters

NameTypeRequiredDescriptionDefault
markdownObjectNoImage Options (Enterprise Edition)
flavourStringNoFlavour (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.