Skip to main content

A Sphinx PDF builder using pyppeteer

Project description

Sphinx Pyppeteer builder is a PDF generator for Sphinx without usage of LaTeX. It uses Pyppeteer, a wrapper to control a web browser. It supports Chromium for now.

Install

You can install it with pip:

pip install sphinx_pyppeteer_builder

Or with setup.py:

python setup.py install
pyppeteer-install

Configuration

You can configure your output with these options:

  • pyppeteer_basename

  • pyppeteer_theme

  • pyppeteer_theme_options

  • pyppeteer_title

  • pyppeteer_theme_path

  • pyppeteer_short_title

  • pyppeteer_style

  • pyppeteer_css_files

  • pyppeteer_show_copyright

  • pyppeteer_show_sphinx

Each one has the same behavior of its equivalent for html builder.

In addition, you can set pyppeteer_pdf_options var. This dict is passed as is to the pdf coroutine. Default values are:

pyppeteer_pdf_options = {
    'printBackground': True,
    'format': 'A4',
    'margin': {
        'top': '20mm',
        'bottom': '20mm',
        'left': '10mm',
        'right': '10mm'
    }
}

Use

Just launch the following:

make pyppeteer

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 but it is not based on CSS stylesheets.

Web browser to generate PDF have all new generation CSS specs implemented. You can use sphinx_weasyprint_builder instead if you don’t want a full browser.

This plugin is just singlehtml output with conversion to PDF.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_pyppeteer_builder-0.1.1.tar.gz (25.1 kB view details)

Uploaded Source

File details

Details for the file sphinx_pyppeteer_builder-0.1.1.tar.gz.

File metadata

  • Download URL: sphinx_pyppeteer_builder-0.1.1.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

File hashes

Hashes for sphinx_pyppeteer_builder-0.1.1.tar.gz
Algorithm Hash digest
SHA256 966e9cda7254fd03df9624bf282615daefd87b5d6fb0094f40a7e6662335d3dd
MD5 88e83fa5d0ee171f4dfa9d6bcf50b6bb
BLAKE2b-256 642ec95cf4bdfcb394f1a5e9149be6cdd022b88f2f409a844c53ddebaa2d87f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page