A straightforward tool for converting Markdown to PDF. Write your Markdown, see a live preview, and save it as a PDF.
This project started out of a simple need: an easy way to convert AI-generated responses from Markdown to PDF, whether on a computer or a smartphone. I created this website to streamline that process for my own workflow.
It also served as an opportunity to learn the basics of web development. Although I had experience with JavaScript through React Native, I had never explored web development before.
- Open the md2pdf website.
- Write or paste your Markdown into the editor on the left.
- See the live preview on the right. The panes scroll in sync, so you won't lose your place.
- Click the "Save" button to open the print dialog and save the document as a PDF.
This project is built with a few key libraries:
- Astro: The web framework.
- Marked: For parsing Markdown.
- DOMPurify: To sanitize the HTML output and prevent XSS attacks.
This project is licensed under the MIT License. See the LICENSE file for details.