sphinx-simplepdf
raw JSON → 1.7.0 verified Fri May 01 auth: no python
An easy-to-use PDF Builder for Sphinx with a modern PDF theme. Version 1.7.0 supports Sphinx 4-7 and uses WeasyPrint or wkhtmltopdf under the hood. Moderate release cadence.
pip install sphinx-simplepdf Common errors
error Builder name 'simplepdf' not found ↓
cause Extension not enabled in conf.py or not installed.
fix
Add 'sphinx_simplepdf' to extensions list in conf.py and install package: pip install sphinx-simplepdf
error ModuleNotFoundError: No module named 'weasyprint' ↓
cause WeasyPrint is required but not installed.
fix
pip install weasyprint (or install system dependencies for WeasyPrint).
error AttributeError: module 'sphinx_simplepdf' has no attribute 'setup' ↓
cause Wrong import or old version of the package.
fix
Ensure you installed sphinx-simplepdf (>=1.0.0) and added it as string in extensions list.
Warnings
breaking Version 1.0.0 renamed the builder from 'pdflatex' to 'simplepdf'. Old command 'sphinx-build -b pdflatex ...' will fail. ↓
fix Use 'sphinx-build -b simplepdf ...'
deprecated Support for wkhtmltopdf is deprecated in favor of WeasyPrint. wkhtmltopdf may be removed in future releases. ↓
fix Switch to WeasyPrint: pip install weasyprint and remove wkhtmltopdf config.
gotcha If you set 'latex_engine' in conf.py, it may cause conflicts. sphinx-simplepdf ignores it but Sphinx emits a warning. ↓
fix Remove or comment out 'latex_engine' from conf.py.
Imports
- SimplePdfBuilder
from sphinx_simplepdf.builder import SimplePdfBuilder
Quickstart
extensions = ['sphinx_simplepdf']
# Optional: configure output
simplepdf_documents = [
{
'doc': 'index',
'title': 'My Project',
'author': 'Author Name'
}
]
# Build with: sphinx-build -b simplepdf . _build/pdf