In this project, we will use JavaScript to generate a PDF file based on another file written in Markdown. The motivation for me is this: I usually write a document, using simple text, that covers an executive summary for most of my meetings. I want to have a PDF of it. Anyway, that is my case — your situation might be something else.

What matters is that I was using Markdown already. Markdown is the well-known lightweight markup language designed to be easily converted to HTML. Developers know that, but if you don’t know, now you know. Since Markdown can become HTML and HTML can become PDF, I had the idea to start wrapping my reports to PDF.

Let’s see the PDF generated from it

The following screenshot is here to help you visualize the whole flow more easily:

The screenshot of of the PDF preview in my Mac OS X

#coding #programming #nodejs #javascript

How to generate a PDF from a Markdown file — using Node.js and JavaScript
1.45 GEEK