rst2pdf
Convert reStructured Text to PDF via ReportLab.
What it is and what it does
rst2pdf is a command-line tool and Python library that converts reStructuredText documents directly to PDF without requiring LaTeX. It uses ReportLab as its PDF generation backend, offering an alternative workflow for developers and technical writers who want to produce PDFs from plain-text markup.
The package supports a wide range of features including custom page layouts with multiple frames, cascading stylesheets, TTF and Type1 font embedding, syntax highlighting via Pygments, image embedding, and hyphenation. It integrates with Sphinx as an extension for building PDF documentation. Runtime dependencies include docutils (for RST parsing), Jinja2 (templating), Pygments (syntax highlighting), PyYAML (configuration), packaging (version handling), and ReportLab (PDF generation).
Use it for:
- Generate PDF technical documentation directly from reStructuredText source without LaTeX toolchain.
- Build PDF output in Sphinx documentation projects via the rst2pdf.pdfbuilder extension.
- Convert standalone RST files to styled PDFs with custom fonts, page layouts, and syntax-highlighted code blocks.
- Automate PDF report generation from RST templates in CI/CD pipelines.
- Create branded PDF documents with cascading stylesheets and embedded images from RST markup.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts reStructuredText documents directly to PDF using ReportLab, bypassing LaTeX and offering customizable page layouts, styling, and embedded fonts.
Yes. rst2pdf is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem—direct RST-to-PDF conversion without LaTeX. It's suitable for technical documentation, Sphinx integration, and automated PDF generation workflows. The MIT license is permissive. Install it if you work with reStructuredText and need PDF output.
Install
rst2pdf on PyPI
pip
pip install rst2pdfuv
uv add rst2pdfpoetry
poetry add rst2pdfInstalling rst2pdf
Before you install
Low friction install with a pure-Python wheel. Actively maintained with recent commits and no known vulnerabilities. Requires Python 3.10 or greater; version 0.105 is current as of March 2026.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install rst2pdf
rst2pdf input.rst output.pdf
Requires Python 3.10 or greater. Optional extras (aafiguresupport, mathsupport, plantumlsupport, rawhtmlsupport, sphinx, svgsupport) require additional dependencies.
Verify before relying
- Whether Sphinx integration requires additional configuration beyond enabling the rst2pdf.pdfbuilder extension.
- Performance characteristics when processing large or complex reStructuredText documents.
- Completeness of reStructuredText feature support compared to LaTeX-based converters.
Package facts
| License | Copyright (c) 2007-2020 Roberto Alsina and the contributors to the rst2pdf project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — docutils, jinja2, packaging, pygments, pyyaml, reportlab |
| Maintenance | actively maintained — 158 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 209,371/month — #9,515 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rst2pdf-0.105-py3-none-any.whl
Keywords: convert, docutils, pdf, pygments, reportlab', restructured, rst
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
rich-rstRenders reStructuredText documents as Rich…
permissive · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
sphinx-simplepdfSphinx-SimplePDF is a Sphinx extension that…
permissive · top 15,000 on PyPI
rlPyCairoA Cairo-based rendering backend plugin that…
permissive · top 5,000 on PyPI
m2r2Converts markdown files with embedded…
permissive · top 15,000 on PyPI
PyLaTeXPyLaTeX generates LaTeX documents and code…
permissive · top 15,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
xhtml2pdfConverts HTML and CSS to PDF documents using…
permissive · top 5,000 on PyPI
rst2ansiConverts reStructuredText documents to…
permissive · top 15,000 on PyPI
sphinx_mdincludeSphinx extension that lets you include and…
permissive · top 15,000 on PyPI