ReportLab Snippets (Beta)
Code snippets are bits of re-usable code submitted by the ReportLab community. We don't promise that they are accurate, up-to-date or correct - use them at your own risk!
We'd love it if you could participate by submitting your own snippets and sharing your experience with others by commenting. You will need to create a user account by filling out our very simple form.
Python snippets:
-
Simple Pie Chart
by rptlab
- 2 years, 2 months
Create a simple Pie chart that can save itself into PDF.
-
Just another ordinary pie chart
by rptlab
- 2 years, 2 months
a basic pie chart made with reportlab library
-
A Vertical Bar Chart
by rptlab
- 2 years, 2 months
Vertical Bar Chart
-
A breakdown pie chart
by rptlab
- 2 years, 2 months
A breakdown pie chart
-
Line Plot
by rptlab
- 2 years, 2 months
A line plot with legend
-
Table of contents
by rptlab
- 2 years, 1 month
An easy way to generate table of contents.
-
Alpha Colours (transparency)
by rptlab
- 2 years, 1 month
Simple usage of transparent colours.
-
Colourising code with Pygments
by rptlab
- 2 years, 1 month
You can easily include colourised code samples in your ReportLab scripts
-
Alpha Colours (transparency for cmyk)
by rptlab
- 2 years, 1 month
Illustrate alpha for CMYK (actually PCMYK) colors
-
TOC with clickable links
by rptlab
- 2 years
Creates a TOC like snippet 8, but with clickable text
-
Spreadsheet Table for Platypus
by tomaszswiderski
- 1 year, 11 months
Evaluate formulas at runtime and repeat bottom rows in ReportLab tables.
-
Creating a PDF on disk from RML (XML)
by damian
- 1 year, 10 months
Simple example using rml2pdf to generate a PDF document on disk from RML
-
Creating a PDF in memory from within a web application
by damian
- 1 year, 10 months
Simple Django web application view for dynamically creating a PDF from RML
-
Spreadsheet Table
by tomaszswiderski
- 1 year, 4 months
Use spreadsheet-like tables inside your PDFs
-
CMYK and Pantone ink overprinting
by damian
- 1 year, 4 months
Example of overprinting inks on top of one another to mix colours.
