A Sphinx PDF builder using WeasyPrint
Sphinx WeasyPrint builder is a PDF generator for Sphinx without usage of LaTeX.
You can install it with pip:
pip install sphinx_weasyprint_builder
Or with setup.py:
python setup.py install
You can configure your output with these options:
Each one has the same behavior of its equivalent for html builder.
Your theme must support print media, you can have a lot of troubles due to bad CSS. Please refer to the WeasyPrint documentation to know how to write CSS for printing. For example, WeasyPrint can’t create scrollbars and some text overflows the page.
You can use the sphinx_weasyprint_theme installed with this plugin to start (coming soon!).
In addition, you can set these three variables:
This builder analyzes generated HTML to extract with BeautifulSoup a footer and a header. They are removed from main HTML and reinjected on each page, conforming to theme’s CSS. By default, no header and no footer.
Use compatible selectors for BeautifulSoup.
Just launch the following:
Why an other PDF builder for Sphinx?
LaTeX is really hard to use and to personalize. There’s also an other project to make PDF without LaTeX.
This plugin is just singlehtml output with conversion to PDF.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size sphinx_weasyprint_builder-0.1.3.tar.gz (26.8 kB)||File type Source||Python version None||Upload date||Hashes View|
|Filename, size sphinx_weasyprint_builder-0.1.3-py3-none-any.whl (27.7 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
Hashes for sphinx_weasyprint_builder-0.1.3.tar.gz
Hashes for sphinx_weasyprint_builder-0.1.3-py3-none-any.whl