-
-
Save stonecharioteer/a79dd43f5a1d7bd887fd97316580ea36 to your computer and use it in GitHub Desktop.
pdf output from sphinx with rst2pdf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install rst2pdf | |
- use your package manager (or) | |
- pip install rst2pdf (or) | |
- easy_install rst2pdf | |
2. Add rst2pdf to the list of extensions in conf.py | |
extensions = ['rst2pdf.pdfbuilder'] | |
This list will be empty if you accepted the defaults when the project was setup. If not, just append 'rst2pdf.pdfbuilder' to the list. | |
3. Add a pdf_documents variable to conf.py | |
pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'Your Name'),] | |
# index - master document | |
# rst2pdf - name of the generated pdf | |
# Sample rst2pdf doc - title of the pdf | |
# Your Name - author name in the pdf | |
4. Generate pdf | |
sphinx-build -b pdf source build/pdf | |
The generated pdf will be in the build/pdf directory. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment