Skip to content

ayhamDev/MarkdownPDF

Repository files navigation

MarkdownPDF

A blazingly fast, privacy-first, browser-native Markdown to PDF converter.

License: MIT React Tailwind CSS Open Source

Launch AppReport BugBuy me a coffee


✨ Overview

MarkdownPDF is a powerful document creation tool designed to bridge the gap between simple Markdown writing and professional PDF publishing. Unlike other converters that rely on server-side rendering or blurry canvas snapshots, MarkdownPDF uses native browser orchestration to generate flawless, selectable-text vector PDFs.


🔥 Key Features

  • Pro-Level Editor: Integrated Monaco Editor (the engine behind VS Code) with full syntax highlighting, auto-completion, and multi-page support.
  • True Vector Export: Utilizes CSS @page rules to generate high-fidelity PDFs directly through the browser engine. Text remains selectable and resolution is infinite.
  • AI Copilot (Gemini): A built-in AI assistant to help you rewrite, summarize, or generate content. Privacy First: Bring your own API key to keep data at-cost and private.
  • Aesthetic Themes: Choose from professionally designed themes like Sleek, Dracula, Terminal, Midnight, and more.
  • Typography Tuning: Granular control over font sizes, line heights, and paddings for every element (H1, H2, H3, P).
  • Math & Tables: Full support for KaTeX math equations and GitHub Flavored Markdown (GFM) tables.
  • 100% Privacy: No server uploads. Your data is stored in your browser's localStorage and processed entirely on your machine.

🛠️ Tech Stack


💻 Local Development

Prerequisites

  • Node.js (Latest LTS recommended)
  • npm or yarn

Setup

  1. Clone the repository:

    git clone https://github.com/ayhamDev/MarkdownPDF.git
    cd MarkdownPDF
  2. Install dependencies:

    npm install
  3. Environment Variables: Create a .env.local file in the root directory:

    GEMINI_API_KEY="your_api_key_here"
    
  4. Run the development server:

    npm run dev
  5. Open the app: Navigate to http://localhost:3000 in your browser.


🤖 Using the AI Features

To keep this tool free and private, the AI features require your own Google Gemini API Key.

  1. Get a free key from the Google AI Studio.
  2. In the MarkdownPDF app, click the Settings icon.
  3. Paste your key into the API Key field.
  4. Open the AI Chat drawer and start drafting!

🔒 Privacy Policy

MarkdownPDF is a serverless application.

  • No Content Tracking: Your documents are never uploaded to our servers.
  • Local Storage: Documents are saved to your browser's local storage.
  • Direct AI Link: When using the AI feature, data is sent directly to Google Gemini APIs. We do not intercept or log your prompts.

🤝 Contributing

Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


☕ Support

If MarkdownPDF helped you save time or create something beautiful, consider supporting the developer:

Buy Me A Coffee


Built with ❤️ by AyhamDev

About

A powerful React-based Markdown to PDF generator featuring Monaco editor, customizable themes, embedded charts, KaTeX math, and a Google Gemini AI copilot.

Topics

Resources

License

Stars

Watchers

Forks

Contributors