create_pdf_from_markdown
Convert markdown content into PDF files with customizable paper format, orientation, border margins, and optional watermarks. Supports headers, lists, tables, images, and code blocks, saving results to a specified directory.
Instructions
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 |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from markdown2pdf-mcp
Related Tools
- @zcaceres/markdownify-mcp
- @JDJR2024/markdownify-mcp-utf8
- @cablate/mcp-doc-forge
- @fashionzzZ/markdown-to-html
- @Vortiago/mcp-outline