Markdown to PDF
Utility Module
Editor
Split
Preview
.pdf
Export PDF
Markdown Editor
# Welcome to Markdown Converter ## 1. Overall Summary ### Purpose and Function **What it is:** `Markdown to PDF` is a utility module designed to convert your markdown documents into professional, multi-page PDF files with smart page breaks and custom styling. **How it works:** Simply type your markdown in the editor, see it rendered in the live preview, and click Export PDF to download it. ### Key Features * **High Resolution:** Uses 2x scaling for crisp text. * **Smart Paging:** Prevents cutting headers and code blocks in half. * **Theme Aware:** Toggle between dark and light modes for the UI. --- ## 2. Technical Details > **Note:** The preview uses a simulated paper view to give you an accurate representation of the final PDF output. ```javascript const handleExport = () => { const opt = { margin: [15, 15, 15, 15], filename: 'document.pdf', pagebreak: { mode: ['avoid-all', 'css', 'legacy'] } }; html2pdf().set(opt).from(element).save(); }; ```
Live Preview
Live