Giter Club home page Giter Club logo

django-puppeteer-pdf's Introduction

django-puppeteer-pdf

Latest version Travis-CI Documentation Status Number of PyPI downloads on a month

Converts HTML to PDF

Provides Django views to wrap the HTML to PDF conversion using puppeteer.

Forked from: django-wkhtmltopdf.

Requirements

cli for puppeteer puppeteer-pdf.

Python 2.6+ and 3.3+ are supported. See travis-ci build status for details

Note

  • Current version is only tested as a use of django rest framework renderer examples/drf_renderer.py
  • Documentation is not up to date but you can see working use cases in examples directory
  • Reporting bugs and issues is welcomed

Installation

Run pip install django-puppeteer-pdf.

By default it will execute the first puppeteer-pdf command found on your PATH.

It is recommended to specify full path of puppeteer-pdf using one of the way mentioned below.

If you can't add puppeteer-pdf to your PATH, you can set PUPPETEER_PDF_CMD to a specific executable:

e.g. in settings.py:

PUPPETEER_PDF_CMD = '/path/to/my/puppeteer-pdf'

or alternatively as env variable:

export PUPPETEER_PDF_CMD=/path/to/my/puppeteer-pdf

You may also set PUPPETEER_PDF_CMD_OPTIONS in settings.py to a dictionary of default command-line options.

The default is:

PUPPETEER_PDF_CMD_OPTIONS = {
    'format': 'A4',
}

Documentation

Documentation is available at http://django-puppeteer-pdf.readthedocs.org/en/latest/.

License

MIT licensed. See the bundled LICENSE file for more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.