Skip to content

v2.3.0

Latest

Choose a tag to compare

@2b3pro 2b3pro released this 13 Oct 04:52

markdown2pdf-mcp: Markdown in, polished PDF out

What's New in v2.3.0

This release expands markdown2pdf-mcp into a multi-tool suite with batch processing, pre-flight linting, visual themes, custom styling, and performance optimizations.

πŸš€ New Tools

  • batch_create_pdf: Convert multiple Markdown documents or local files in a single operation. Reuses a single Chromium browser session across the entire batch, dramatically accelerating multi-document conversion workloads. Supports a sharedConfig block with per-document overrides.
  • validate_markdown: Fast, pure Node.js pre-flight linter (0ms browser overhead). Catches unsupported LaTeX math formulas, alerts about stripped HTML tags, validates Mermaid diagram headers/delimiters, checks image references against M2P_ASSETS_DIR, and calculates document statistics (characters, lines, words, estimated pages).

🎨 Visual Themes & Custom Styling

  • 5 Built-in Themes:
    • default: Modern system sans-serif typography (-apple-system, Segoe UI, Roboto).
    • github: GitHub-flavored markdown with borders, zebra tables, and shaded code blocks.
    • academic: Formal serif typography (Times New Roman), justified text, and paper layout.
    • report: Executive report styling with corporate accents and callouts.
    • minimal: Elegant minimalist layout with light typography and generous whitespace.
  • Custom CSS (customCss): Injects custom styles directly into the document.
  • Asymmetric Margins (margin): Configure individual { top, right, bottom, left } margins in addition to uniform paperBorder.
  • Running Headers & Footers: Added headerText and footerText for custom running titles and notices alongside page numbers and watermarks.

⚑ Performance & Usability

  • Direct File Input (inputPath): Convert local .md files directly from disk in both single and batch tools without loading document contents into LLM context windows.
  • Browser Lifecycle Optimization: Shared browser instances for batch processing and clean tab recycling.
  • MCP Protocol Alignment: Converted runtime generation errors into { isError: true, content: [...] } tool responses for autonomous LLM self-correction.
  • Process Memory Leak Fix: Cleaned up process signal handlers to eliminate EventEmitter listener leaks.

Upgrade

npx -y markdown2pdf-mcp@latest

Full details in the CHANGELOG.