Sphinx WeasyPrint builder
Sphinx WeasyPrint builder is a PDF generator for Sphinx without usage of LaTeX.
Install
You can install it with pip:
pip install sphinx_weasyprint_builder
Or with setup.py:
python setup.py install
Configuration
You can configure your output with these options:
weasyprint_basename
weasyprint_theme
weasyprint_theme_options
weasyprint_title
weasyprint_theme_path
weasyprint_short_title
weasyprint_style
weasyprint_css_files
weasyprint_show_copyright
weasyprint_show_sphinx
Each one has the same behavior of its equivalent for html builder.
In addition, you can set these three variables:
weasyprint_main_selector
weasyprint_footer_selector
weasyprint_header_selector
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.
Use
Just launch the following:
make weasyprint
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.
WeasyPrint converts HTML to PDF. It’s the easiest way to customize theme and use a constant quality whatever the media is. If your HTML theme doesn’t have any JavaScript, you can imagine use the same as HTML and PDF output.
This plugin is just singlehtml output with conversion to PDF.
Metadata
Release files for sphinx-weasyprint-builder 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinx_weasyprint_builder-0.1.3.tar.gz | 26.8 kB | Without provenance | Details for sphinx_weasyprint_builder-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinx_weasyprint_builder-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for sphinx_weasyprint_builder-0.1.3-py3-none-any.whl |
Total release size: 54.5 kB
Release files / sphinx_weasyprint_builder-0.1.3.tar.gz
| Download URL | sphinx_weasyprint_builder-0.1.3.tar.gz |
|---|---|
| Size | 26.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92b0584d5c6f35c3435686b608a9e991392f6d8bc6311e723cc6c87113e61c9e
|
|
BLAKE2b-256 checksum How to use checksums |
08d7d5201acad9c69d212c9d4315265b7cc7cae2c30a170edb6c60bbe334fd6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.8.6
|
Release files / sphinx_weasyprint_builder-0.1.3-py3-none-any.whl
| Download URL | sphinx_weasyprint_builder-0.1.3-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c423fcdecb42b7bd752804745fce960254aa85cd1a5de9c82bb2551c6043a936
|
|
BLAKE2b-256 checksum How to use checksums |
991b67ad89ec653a0ca945d6ccd2a40b653a39a02104110d2c16a3ead185aa38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.8.6
|
Security for sphinx-weasyprint-builder 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.