Create nice-looking PDF reports from HTML content.
Project description
PDF Reports (complete documentation here) is a Python library to create nice-looking PDF reports from HTML or Pug templates. It features modern-looking components (via the Semantic UI framework) and provides routines to embed tables or plots in the documents.
Example of use
Your Pug template file template.pug may look like this (see a full example):
#sidebar I am the text in the sidebar.
h1 {{ title }}
.ui.piled.segment
p Oh hi there ! I am some text in a cool box.
Your Python code will be as follows:
from pdf_reports import pug_to_html, write_report
html = pug_to_html("template.pug", title="My report")
write_report(html, "example.pdf")
And your final result may look like this (PDF file):
Infos
PIP installation:
pip install pdf_reports
Web documentation:
https://edinburgh-genome-foundry.github.io/pdf_reports/
Github Page:
https://github.com/Edinburgh-Genome-Foundry/pdf_reports
Live demo:
http://cuba.genomefoundry.org/sculpt_a_sequence
License: MIT, Copyright Edinburgh Genome Foundry
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pdf_reports-0.3.6.tar.gz
.
File metadata
- Download URL: pdf_reports-0.3.6.tar.gz
- Upload date:
- Size: 124.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 652096ca16694eb3fd811b82178bf93bfb37b753d28e028144261baccf0ecf95 |
|
MD5 | aa4eed8a1e98cf66d69dd485a7d7a06c |
|
BLAKE2b-256 | a5ba0b7234cf87c272bc6b71f3e1b533fc7b5ed567f2d58a4929c12e7eb4ed89 |
File details
Details for the file pdf_reports-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: pdf_reports-0.3.6-py3-none-any.whl
- Upload date:
- Size: 118.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbb1207fd5cd3ab45d82cfae956ffa45e200666e426fcbef983b5e75666c69cf |
|
MD5 | 22dc73af892c7ce17b715c11afa498f6 |
|
BLAKE2b-256 | 2facb6df4e91b298bf622f965c7fd03c5cb23d5d28ad723328f110a0e276de8e |