markdown2pdf-mcp
by 2b3pro
create_pdf_from_markdown
Convert markdown content to PDF. Note: Cannot handle LaTeX math equations. Supports basic markdown elements like headers, lists, tables, code blocks, blockquotes, and images (both local and external URLs).
Input Schema
Name | Required | Description | Default |
---|---|---|---|
markdown | Yes | Markdown content to convert to PDF | |
outputFilename | No | The filename of the PDF file to be saved (e.g. "output.pdf"). The environmental variable M2P_OUTPUT_DIR sets the output path directory. If not provided, it will default to user's HOME directory. | |
paperBorder | No | Border margin for the PDF (default: 2cm). Use CSS units (cm, mm, in, px) | 20mm |
paperFormat | No | Paper format for the PDF (default: letter) | letter |
paperOrientation | No | Paper orientation for the PDF (default: portrait) | portrait |
watermark | No | Optional watermark text (max 15 characters, uppercase), e.g. "DRAFT", "PRELIMINARY", "CONFIDENTIAL", "FOR REVIEW", etc |