Skip to content

Latest commit

 

History

History
39 lines (21 loc) · 1009 Bytes

README.md

File metadata and controls

39 lines (21 loc) · 1009 Bytes

py4web-weasyprint

Easely generate PDF outputs via WeasyPrint on top of py4web.

Installation

Considering that this plugin works on top of weasyprint, it needs some external dependencies as weasyprint does.

Step 1)

Follow these install instructions if you're on a Linux distro.

Follow these install instructions if you're on MacOS.

Follow these install instructions if you're on Windows.

Step 2)

Building from source:

python setup.py install

Installing from pip:

pip install py4web-weasyprint (still not available)

Example

from py4web_weasy import WeasyTemplate

@action('mypdfpage')
@action.uses(WeasyTemplate("mypdfpage.html"))
def mypdfpage():
    return {}