Markdown is a very simple and easy-to-use markup language for creating formatted text using any text editor.
In this post, we will see how to convert a markdown to pdf in the VSCode editor.
You can also use markdown to create content for a website using a markdown compiler that converts markdown content to HTML.
However, here we will see how we can convert and export our markdown file to pdf format from our VSCode editor.
In VS code, we can use the extension Markdown PDF to export our file into various formats like pdf, html, jpeg, and png.
Convert and export markdown to pdf
First, install the Markdown PDF plugin in your VSCode editor.
Steps to convert markdown to PDF in Visual Studio Code
Once the plugin is installed successfully in your VScode following the steps :
- Open the markdown file you want to convert in VS Code.
- Click on the Markdown PDF icon in the toolbar or press F1 or Ctrl+Shift+P to open the command palette.
- Search for “Markdown PDF: Export (pdf)” and select it.
- From the drop-down list that appears at the top, select “Markdown PDF: Export (pdf)” to generate the PDF from the currently open markdown file.
- Now you can navigate to the downloaded pdf and open the exported PDF file.
Using the menu in VSCode
You can also convert the file to pdf using the menu too.
After you have installed the plugin, just open the markdown file, and right-click
on it, and then select the desired format you want to export your file.
Related Topics:
How to convert markdown to PDF using Pandoc Converter
Easy Way to add Emoji in markdown with VS Code
How to write superscript and subscript in markdown
How to center align an image in markdown
How to do text highlight in markdown