-
Notifications
You must be signed in to change notification settings - Fork 18
Bug Report: Large File Conversion Failure #7
Description
Package Information
- Package:
markdown2pdf-mcp - Version: 2.1.3
- Repository: https://github.com/2b3pro/markdown2pdf-mcp
Environment
- OS: Windows 11
- Node.js: 24.5.0
- Execution: Via MCP (Model Context Protocol) integration in Kiro IDE
Bug Description
The create_pdf_from_markdown_file tool fails silently when attempting to convert large markdown files. Small files (< 50 lines) convert successfully, but larger files (1300+ lines) fail without error messages.
Test Results
✅ Successful Test (Small File)
- File:
test-markdown2pdf.md - Size: ~20 lines
- Content: Basic markdown with headings, lists, bold/italic text, code block
- Result: Successfully created PDF at
C:\Users\woter1832\test-output.pdf
❌ Failed Test (Large File)
- File:
Workshop-Minutes-2025-10-06-DETAILED.md - Size: 1363 lines
- Content: Complex document with multiple sections, tables of contents, nested headings
- Result: Tool execution failed with no error message
Steps to Reproduce
-
Install the package version 2.1.3:
npm install -g markdown2pdf-mcp@2.1.3
-
Configure MCP server in Kiro IDE:
{ "markdown2pdf": { "command": "npx", "args": ["markdown2pdf-mcp@2.1.3"], "disabled": false } } -
Test with small file (works):
create_pdf_from_markdown({ markdown: "# Test\n\nSmall content", outputFilename: "test.pdf" })
-
Test with large file (fails):
create_pdf_from_markdown_file({ markdownFilePath: "path/to/large-file.md", outputFilename: "output.pdf" })
Expected Behaviour
Large markdown files should convert to PDF successfully, or return a meaningful error message if there are size limitations.
Actual Behaviour
The tool fails silently with "Tool execution failed" and no additional error information. No PDF is generated.
Possible Causes
- Timeout: Large files may exceed processing timeout limits
- Memory: Insufficient memory allocation for large file processing
- Buffer size: Input buffer may have size restrictions
- Error handling: Errors during processing may not be properly caught and reported
Suggested Investigation
- Add timeout configuration options for large files
- Implement proper error handling and reporting
- Add file size validation with clear error messages
- Consider streaming or chunked processing for large files
- Add debug logging to identify where the process fails
Workaround
None currently available. Users must use alternative tools (e.g., pandoc directly) for large markdown files.
Additional Context
- The Windows path handling issue reported in Bug Report: Windows Path Handling Issue #6 has been successfully fixed in version 2.1.3
- Small files convert without any issues
- The failure occurs with both relative and absolute file paths
- No error logs are generated in the MCP server output
Impact
This limits the tool's usefulness for real-world documentation, which often exceeds 1000 lines. Users cannot convert comprehensive technical documents, meeting minutes, or detailed specifications.
Reported by: @woter1832
Issue created by AI: Sonnet 4.5 (Kiro)
Severity: High (tool unusable for large documents)