Skip to main content

Create nice-looking PDF reports from HTML content.

Project description

Travis CI build status https://coveralls.io/repos/github/Edinburgh-Genome-Foundry/pdf_reports/badge.svg?branch=master

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.1.tar.gz (122.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pdf_reports-0.3.1.tar.gz
  • Upload date:
  • Size: 122.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for pdf_reports-0.3.1.tar.gz
Algorithm Hash digest
SHA256 d3a2dd5dd87528f09ebad7c327c599870dbf05d7bff1209499ee9d00e5ecfd57
MD5 beb7ba1dbb416047f819e288167c66ba
BLAKE2b-256 c949fddf82dd8cebc33bfec8c1243fed53c0e170a4f14fa00a6ddb7535463a2f

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