Python command line application to convert Markdown to PDF.
Project description
mdpdf
Python command line application to convert Markdown to PDF.
Project Features
- Bare-bones: Only supports basic CommonMark
- "One-size-fits-all" style: Left-aligned, PDF-base14 fonts. Reasonably pretty, but if you want more control, see alternatives below.
- Headings are transformed to PDF bookmarks.
- File links are transformed into attachments with PDF links.
- Images links are transformed into embedded images with optional captions and width specifier.
- Minimal requirements
Alternatives
There are several projects that can be considered if you need something with more features. Of note:
Installation
$ pip install mdpdf
Usage
$ mdpdf [OPTIONS] [INPUTS]...
Options:
-o, --output FILEDestination for file output. [required]-h, --header <template>Sets the header template.-f, --footer <template>Footer template.-t, --title TEXTPDF title.-s, --subject TEXTPDF subject.-a, --author TEXTPDF author.-k, --keywords TEXTPDF keywords.-p, --paper [letter|A4]Paper size (default letter).--versionShow the version and exit.--helpShow this message and exit.
Templates:
The <template> is a quoted, comma-
delimited string, containing the left, centre,
and right, fields for the header/footer. Format is "[left],[middle],[right]".
Possible values to put here are:
- Empty string
- Arbitrary text
- Special variables:
{page}current page number{header}current top-level body text heading{date}current date
Example:
$ mdpdf -o article.pdf article.md
$ mdpdf -o article.pdf --footer "{date},{heading},{page}" article.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mdpdf-0.0.18.tar.gz.
File metadata
- Download URL: mdpdf-0.0.18.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2465e47ef772554f09662ce359ac5924eddce1564cb4df685f7bf3ca8d0e6a7c
|
|
| MD5 |
b98529567405837eb1f1fe989d1f75c9
|
|
| BLAKE2b-256 |
994f90d6dd1276e9726f59c4efccb12782eef2b125610f5a7f766938d1880316
|
File details
Details for the file mdpdf-0.0.18-py3-none-any.whl.
File metadata
- Download URL: mdpdf-0.0.18-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be135cfca4a0c4fde86004670b06780744432671c3272e4ff064790e2e572665
|
|
| MD5 |
81d4d69d262eb7cf9c3cab221fd92a7f
|
|
| BLAKE2b-256 |
ed2a1be7477288707b4cd3e25a53c05c87adc62fb8658cfbb3178d39fd5172d1
|