Skip to content

Ableytner/markdown-to-pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown to PDF

Convert a markdown file to PDF using Github Dark Dimmed styling.

Usage

Open a new command prompt window and run the following command:

mdtopdf your_markdown_file.md

or

python -m mdtopdf your_markdown_file.md

After a few seconds, a new pdf file with the name of the original file should appear.

Any images the markdown file contained are embedded into the final pdf.

Installation

PyPI

This project is currently not published on PyPI because all combinations of markdown-to-pdf / mdtopdf are already taken.

Github

To install the latest development version directly from Github, run the following command:

pip install git+https://github.com/Ableytner/markdown-to-pdf.git

Additionally, a wheel is added to every stable release, which can be manually downloaded and installed, or installed with the following command:

pip install git+https://github.com/Ableytner/markdown-to-pdf/releases/download/1.0.0/markdown-to-pdf-1.0.0.tar.gz

where 1.0.0 is the version you want to install.

requirements.txt

If you want to include this library as a dependency in your requirements.txt, the syntax is as follows:

mdtopdf @ git+https://github.com/Ableytner/markdown-to-pdf/releases/download/1.0.0/markdown-to-pdf-1.0.0.tar.gz

where 1.0.0 is the version that you want to install.

Alternatively, to always install the latest development version:

mdtopdf @ git+https://github.com/Ableytner/markdown-to-pdf

Troubleshooting on linux

If you try to run the program and it complains about missing packages, you can try the command below:

sudo apt-get install libatk1.0-0t64 libatk-bridge2.0-0t64 libatspi2.0-0t64 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2t64 libcups2t64 libcairo2 libpango-1.0-0

Use latest Github styling

If you want to use the latest Github markdown styling, this package also provides a way to accomplish that.

First, you need to install npm and Node.js.

Install the generate-github-markdown-css library, which is used to generate the Github styling:

npm install --global generate-github-markdown-css

The library will now automatically generate and use the newest Github styling.

About

Convert any markdown file to PDF, using Github styling

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages