Skip to main content
https://img.shields.io/pypi/v/rst2pdf.svg https://img.shields.io/pypi/pyversions/rst2pdf.svg https://img.shields.io/pypi/l/rst2pdf.svg

rst2pdf: Use a text editor. Make a PDF.

The usual way of creating PDF from reStructuredText is by going through LaTeX. This tool provides an alternative by producing PDF directly using the ReportLab library.

More information is available at the main website.

Features

  • User-defined page layout. Multiple frames per page, multiple layouts per document.

  • Page transitions

  • Cascading stylesheet mechanism, define only what you want changed.

  • Supports TTF and Type1 font embedding.

  • Any number of paragraph styles using the class directive.

  • Any number of character styles using text roles.

  • Custom page sizes and margins.

  • Syntax highlighter for many languages, using Pygments.

  • Supports embedding almost any kind of raster or vector images.

  • Supports hyphenation.

  • Sphinx integration

  • Full user’s manual

Installation

rst2pdf supports Python 3.8 or greater. Version 0.99 was the last version to support Python 3.6 & 3.7, with 0.97 the last version to support Python 2.7.

Install from PyPI

The latest released version may be installed from PyPI by using pipx:

$ pipx install rst2pdf

rst2pdf also has support for a number of features that require additional dependencies. Installation of all the required dependencies using pipx may be installed using:

$ pipx install rst2pdf[aafiguresupport,mathsupport,plantumlsupport,rawhtmlsupport,sphinx,svgsupport]

Install from Snap

If you are using a system that supports snaps then you can install from there with:

$ snap install rst2pdf

Install from GitHub

Work on rst2pdf has restarted on GitHub, with the goals of adding new features, addressing outstanding issues, and not breaking anything. You can clone the repository and install this version:

$ git clone https://github.com/rst2pdf/rst2pdf
$ cd rst2pdf
$ git checkout <desired-branch> # if you want something other than main
$ pipx install .[aafiguresupport,mathsupport,plantumlsupport,rawhtmlsupport,sphinx,svgsupport]

If you intend to work on rst2pdf’s source code, see doc/DEVELOPERS.rst.

Usage

To convert a reStructuredText document to a PDF, simply run:

$ rst2pdf <document name> output.pdf

For information on available options, use -h:

$ rst2pdf -h

To enable basic integration with Sphinx, modify your conf.py file to enable the rst2pdf.pdfbuilder extension and configure the pdf_documents option. For example:

extensions = [
    # ...
    'rst2pdf.pdfbuilder',
]

# Grouping the document tree into PDF files. List of tuples
# (source start file, target name, title, author, options).
pdf_documents = [
    ('index', 'MyProject', 'My Project', 'Author Name'),
]

For information on the pdf_documents option and the many other options available, refer to the manual.

Contributing

See CONTRIBUTING.

Code of conduct

rst2pdf is an inclusive and welcoming community. To participate in this project, everyone is bound by our Community Code of Conduct.

Metadata

Release files for rst2pdf 0.101

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rst2pdf 0.101
File Size Uploaded Provenance
rst2pdf-0.101.tar.gz 12.1 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rst2pdf 0.101
File Interpreter ABI Platform
rst2pdf-0.101-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 MB

Release files / rst2pdf-0.101.tar.gz

Download URL rst2pdf-0.101.tar.gz
Size 12.1 MB
Tags Source
SHA-256 checksum
How to use checksums
005f05b2c10814799e636a15ac03cd7bce696e680a58ee76c83eb270d3734d28
BLAKE2b-256 checksum
How to use checksums
63df84aec6026fad6c98aaff21ad9f7af615e84edca145f463b2a8f39d4047e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / rst2pdf-0.101-py3-none-any.whl

Download URL rst2pdf-0.101-py3-none-any.whl
Size 177.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f93892692af3a652c959694082dacb2468d13d915599beca08b3ed5c7fc223e
BLAKE2b-256 checksum
How to use checksums
730abeb33bdf2c623b497b8344911171b36a6254bc5dea6706b57bc946976db4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Security for rst2pdf 0.101

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.

Release history Release notifications | RSS feed

This release

0.101 This release

2 release files No provenance

0.93

0.16

0.13

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page