Skip to main content
https://travis-ci.org/rst2pdf/rst2pdf.svg?branch=master 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.6 or greater. Version 0.97 was the last version to support Python 2.7.

Install from PyPI

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

$ pip install --user rst2pdf

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

$ pip install --user 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 master
$ pip install --user .

Note that you may need to use sudo python setup.py install or sudo python3 setup.py install in this final step, depending on your configuration.

You may want to install it in a virtualenv, but that is beyond the scope of this readme.

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.

Release files for rst2pdf 0.99

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.99
File Size Uploaded
rst2pdf-0.99.tar.gz 12.1 MB Details

Built distribution (wheel)

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

Total release size: 12.3 MB

Release files / rst2pdf-0.99.tar.gz

Download URL rst2pdf-0.99.tar.gz
Size 12.1 MB
Tags Source
SHA-256 checksum
How to use checksums
8fa23fa93bddd1f52d058ceaeab6582c145546d80f2f8a95974f3703bd6c8152
BLAKE2b-256 checksum
How to use checksums
399245e06d31e69d4b3a6ec75826555ea0d03b8cb3a68f879d642af90db29f88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

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

Download URL rst2pdf-0.99-py3-none-any.whl
Size 176.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a4d032552a96de251c62ee1b926e5c5d51ef00345e9e7ce4505b9151d797cc0
BLAKE2b-256 checksum
How to use checksums
99bdbbd07a473b254bbdf3796016c2a2a16de52ed6cbb3158fb8dc5a19f22a94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

0.105

2 release files

0.104

2 release files

0.103

2 release files

0.102

2 release files

0.101

2 release files

0.100

2 release files

This release

0.99 This release

2 release files

0.98

2 release files

0.97

2 release files

0.96

2 release files

0.95.1

2 release files

0.95

2 release files

0.94.1

2 release files

0.94

2 release files

0.93

0.92

1 release file

0.91

1 release file

0.90

1 release file

0.16

0.14.2

1 release file

0.14.1

1 release file

0.14

1 release file

0.13.1

1 release file

0.13

0.12.2

1 release file

0.12.1

1 release file

0.12

1 release file

0.11

1 release file

0.10.1

1 release file

0.9

2 release files

0.8.1

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

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