reportlab-pdf-table-builder
A simple pdf table builder using the ReportLab Toolkit
Example usage
You can run the example.py file to see the result
python example.py
import datetime
from reportlab.lib import colors
from reportlab.lib.enums import TA_RIGHT, TA_CENTER, TA_LEFT
from reportlab.platypus import Spacer
from pdf_table_builder.builder import Row, Column, Grid, pfd_table_builder, ReportLabPDFBuilder
data = [
Row(columns=[Column(content='<font size=10>{}</font>'.format(datetime.date.today().strftime("%d/%m/%Y")))]),
Spacer(1, 1),
Row(columns=[Column(content='Title')]),
Spacer(1, 1),
# Image(buff1, width=150, height=300),
Row(
columns=[
Column(content='Panel color outside:'),
Column(content='7012 Matt'),
Column(content='$100', align=TA_RIGHT),
Column(content='test'),
Column(content='test2', grid=Grid(line_color=colors.yellow, line_width=2)),
],
grid=Grid(line_color=colors.blue, line_width=1),
# text_color=colors.red
),
Row(
columns=[
Column(content='test2', align=TA_CENTER, background_color=colors.red, text_color=colors.blue),
Column(content='Panel color outside:'),
Column(content='7012 Matt'),
Column(content='$100', align=TA_RIGHT, grid=Grid(line_color=colors.yellow, line_width=2)),
Column(content='test', align=TA_CENTER, background_color=colors.aqua),
Column(content='test2', align=TA_CENTER, background_color=colors.red, text_color=colors.white),
Column(content='test2', align=TA_CENTER, background_color=colors.purple, text_color=colors.red),
],
align=TA_LEFT,
background_color=colors.green,
text_color=colors.red,
),
Row(
columns=[
Column(content='test2', align=TA_CENTER, background_color=colors.red, text_color=colors.blue),
Column(content='Panel color outside:'),
Column(content='7012 Matt'),
Column(content='$100', align=TA_RIGHT),
Column(content='test1', background_color=colors.purple),
Column(content='test', align=TA_CENTER, background_color=colors.aqua, text_color=colors.yellow),
Column(content='test2', align=TA_CENTER, background_color=colors.red, text_color=colors.white),
],
background_color=colors.green,
text_color=colors.blue,
grid=Grid(),
),
]
table = pfd_table_builder(data)
pdfbuilder = ReportLabPDFBuilder()
pdfbuilder.add_to_story(table)
pdfbuilder.save_pdf_file('a.pdf')
Metadata
Release files for reportlab-pdf-table-builder 1.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reportlab-pdf-table-builder-1.2.4.tar.gz | 492.8 kB | Without provenance | Details for reportlab-pdf-table-builder-1.2.4.tar.gz |
Release files / reportlab-pdf-table-builder-1.2.4.tar.gz
| Download URL | reportlab-pdf-table-builder-1.2.4.tar.gz |
|---|---|
| Size | 492.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dbf50726e9e43df22e4976e5fd2021cbe30a7640f0ddf2d18978fd71ef1793c4
|
|
BLAKE2b-256 checksum How to use checksums |
45a7d001701c543199c50f4cd99d0b7ef751204443df85665575f919da64d33b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for reportlab-pdf-table-builder 1.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.