DEV Community

Cover image for Python Scripts - .MD 2 .PDF
Envoy-VC
Envoy-VC

Posted on

Python Scripts - .MD 2 .PDF

For this we need a module called mdpdf
to install this simply open Terminal and run this command

pip install mdpdf
Enter fullscreen mode Exit fullscreen mode

Imagine you have a Directory structure like this

- Folder
    - your_md_file.md
Enter fullscreen mode Exit fullscreen mode

Open the terminal in which your .md file is present and then run this command

mdpdf -o output.pdf your_md_file.md
Enter fullscreen mode Exit fullscreen mode

After running this command your directory should look like this

- Folder
    - your_md_file.md
    - output.pdf
    - mdpdf.log

Enter fullscreen mode Exit fullscreen mode

If there are any errors you can check the mdpdf.log file for possible errors

Subscribe to my YouTube Channel - https://www.youtube.com/channel/UCsYVtF7KLPiAanWgwGPYvpA

Discussion (0)