Skip to content

Bros-AI/Markdown2PDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Markdown to PDF Converter πŸš€

Transform your Markdown content into beautifully formatted PDFs with a single click.

License: MIT Version

πŸ“‹ Overview

Markdown to PDF Converter is a lightweight, browser-based tool that converts Markdown content into professionally styled PDF documents. Perfect for creating documentation, reports, articles, or any content that needs to be shared in a polished, platform-independent format.

✨ Key Features

  • πŸ”„ Real-time Preview - See your changes rendered instantly
  • πŸŒ“ Dark Mode Support - Toggle between light and dark themes
  • πŸ“Š Mermaid Diagrams - Create and render flowcharts, sequence diagrams, and more
  • πŸ“± Fully Responsive - Works on desktops, tablets, and mobile devices
  • πŸ’Ύ Auto-Save - Never lose your work with automatic local storage backup
  • πŸ”™ Undo/Redo - Full history management with keyboard shortcuts
  • πŸ› οΈ Customization Options - Page size, orientation, and margins for PDF export
  • 🧩 Formatting Toolbar - Quick access to common Markdown formatting options
  • πŸ“€ Import/Export - Drag-and-drop file imports and one-click exports
  • πŸ”’ Privacy-First - All processing happens in your browser with no server uploads

πŸ› οΈ Quick Start

Option 1: Use the Online Version

Visit mark2pdf.com to use the tool immediately without installation.

Option 2: Self-Host

  1. Download the HTML file

    Download the markdown2pdf.html file from the repository.

  2. Open in Browser

    Simply open the file in any modern web browser.

  3. Start Converting

    Begin writing or pasting your Markdown and generate PDFs with a click.

πŸ“ Markdown Features Showcase

Text Formatting

Regular paragraphs are rendered with appropriate spacing.

Bold text is created with double asterisks.

Italic text uses single asterisks.

Bold and italic can be combined.

Lists

Unordered lists:

  • Item 1
  • Item 2
    • Nested item
    • Another nested item
  • Item 3

Ordered lists:

  1. First step
  2. Second step
  3. Third step

Blockquotes

Blockquotes are created with the greater-than symbol.

Multi-paragraph quotes look like this.

Code Blocks

Inline code: console.log('Hello World');

// Syntax highlighted code blocks
function greet(name) {
  return `Hello, ${name}!`;
}

console.log(greet('Markdown'));

πŸ“Š Diagram Support

Flow Charts

graph TD
    A[Start] --> B{Is it working?}
    B -- Yes --> C[Great!]
    B -- No --> D[Debug]
    D --> B
Loading

Sequence Diagrams

sequenceDiagram
    User->>Editor: Enter Markdown
    Editor->>Preview: Render HTML
    User->>Editor: Click "Generate PDF"
    Editor->>PDF Generator: Convert HTML
    PDF Generator->>User: Download PDF
Loading

Class Diagrams

classDiagram
    class Document {
        +String content
        +render()
        +export()
    }
    class MarkdownDoc {
        +convertToHTML()
    }
    class PDFDoc {
        -String filename
        +download()
    }
    Document <|-- MarkdownDoc
    Document <|-- PDFDoc
Loading

⌨️ Keyboard Shortcuts

Shortcut Action
Ctrl + B Bold text
Ctrl + I Italic text
Ctrl + K Insert link
Ctrl + H Toggle heading
Ctrl + U Unordered list
Ctrl + O Ordered list
Ctrl + Q Blockquote
Ctrl + Shift + C Code block
Ctrl + S Save Markdown
Ctrl + P Generate PDF
Ctrl + Z Undo
Ctrl + Y Redo

πŸ“‹ PDF Export Options

Option Description
File name Customize the output file name
Page size Choose from A4, Letter, Legal
Orientation Portrait or Landscape
Margins Set custom margins in millimeters

πŸ§ͺ Technical Architecture

flowchart TD
    A[Markdown Input] --> B[Marked.js Parser]
    B --> C[HTML Renderer]
    C --> D[Preview Display]
    
    E[User Settings] --> F[Theme Management]
    F --> G[UI Updates]
    
    H[Editor Actions] --> I[History Stack]
    I --> J[Undo/Redo]
    
    K[Generate PDF] --> L[html2pdf.js]
    D --> K
    L --> M[PDF Download]
    
    N[Local Storage] <--> O[Persistence Layer]
    O --> P[Auto-save]
Loading

🌐 Browser Compatibility

Browser Minimum Version Status
Chrome 60+ βœ… Full support
Firefox 60+ βœ… Full support
Safari 12+ βœ… Full support
Edge 79+ βœ… Full support
Opera 60+ βœ… Full support
IE Any ❌ Not supported

πŸ“Š Sample Document

Project Status Report

Task Status Completion
Design βœ… Complete 100%
Frontend ⏳ In Progress 65%
Backend ⏳ In Progress 80%
Testing πŸ”œ Planned 0%
Deployment πŸ”œ Planned 0%

πŸ’Ό Business Use Cases

  • πŸ“„ Technical documentation
  • πŸ“ Meeting notes & minutes
  • πŸ“‘ Project reports & status updates
  • πŸ“Š Data analysis summaries
  • πŸŽ“ Academic papers & assignments
  • πŸ“° Newsletters & articles

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add some amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“¬ Contact

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ by Gauthier Bros

About

Markdown to PDF Converter is a lightweight, browser-based tool that converts Markdown content into professionally styled PDF documents. Perfect for creating documentation, reports, articles, or any content that needs to be shared in a polished, platform-independent format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors