Skip to main content

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):

https://github.com/Edinburgh-Genome-Foundry/pdf_reports/raw/master/screenshot.png

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


Download files

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

Source Distribution

pdf_reports-0.3.5.tar.gz (123.2 kB view details)

Uploaded Source

Built Distribution

pdf_reports-0.3.5-py3-none-any.whl (118.4 kB view details)

Uploaded Python 3

File details

Details for the file pdf_reports-0.3.5.tar.gz.

File metadata

  • Download URL: pdf_reports-0.3.5.tar.gz
  • Upload date:
  • Size: 123.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for pdf_reports-0.3.5.tar.gz
Algorithm Hash digest
SHA256 bfdce675252f941c52468e508d49d75cc43e96865c2cb8b1101d76932085e5b6
MD5 4b855147109cc7f573091176d63ac1dc
BLAKE2b-256 84ab725a6aed9853e88082f804e40d0fb62caf17b716bd76166469974ceec38e

See more details on using hashes here.

File details

Details for the file pdf_reports-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: pdf_reports-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 118.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for pdf_reports-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 89b6a8095e8be15332afb6efa0945d70e28e46b7cc49933a352273b943139158
MD5 3e26be5c420131fabe871db4e358348f
BLAKE2b-256 b0f4738ff79275f5bedfa2e8d8edbe63093696dd31984e819595519a2ad615ec

See more details on using hashes here.

Supported by

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