convert_document
Transform document formats (PDF, HTML, DOCX, Markdown, TXT) while maintaining original styles. Automatically saves outputs to the specified directory. Preserves formatting and supports internal tools for efficient conversions.
Instructions
Convert documents between formats with enhanced style preservation. Output directory is controlled by OUTPUT_DIR environment variable. All output files will be automatically saved to the directory specified by OUTPUT_DIR with auto-generated names. ⚠️ IMPORTANT: For Markdown to HTML conversion with style preservation, use 'convert_markdown_to_html' tool instead for better results with themes and styling. For creating Word documents from content, use 'create_word_document' tool to avoid conversion loops.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
inputPath | Yes | Input file path | |
preserveFormatting | No | Preserve formatting | |
targetFormat | No | Target format: pdf, html, docx, markdown, md, txt (optional, auto-detected from input if not specified) | |
useInternalPlaywright | No | Use built-in Playwright for PDF conversion |