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
Metadata
Release files for mdpdf 0.0.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mdpdf-0.0.18.tar.gz | 14.0 kB | Without provenance | Details for mdpdf-0.0.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mdpdf-0.0.18-py3-none-any.whl | Python 3 | none | any | Details for mdpdf-0.0.18-py3-none-any.whl |
Total release size: 28.7 kB
Release files / mdpdf-0.0.18.tar.gz
| Download URL | mdpdf-0.0.18.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2465e47ef772554f09662ce359ac5924eddce1564cb4df685f7bf3ca8d0e6a7c
|
|
BLAKE2b-256 checksum How to use checksums |
994f90d6dd1276e9726f59c4efccb12782eef2b125610f5a7f766938d1880316
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.2
|
Release files / mdpdf-0.0.18-py3-none-any.whl
| Download URL | mdpdf-0.0.18-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be135cfca4a0c4fde86004670b06780744432671c3272e4ff064790e2e572665
|
|
BLAKE2b-256 checksum How to use checksums |
ed2a1be7477288707b4cd3e25a53c05c87adc62fb8658cfbb3178d39fd5172d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.2
|
Security for mdpdf 0.0.18
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.