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.
All snippets:
-
CMYK and Pantone ink overprinting
(Python)
by damian
- 1 year, 4 months
Example of overprinting inks on top of one another to mix colours.
-
Spreadsheet Table
(Python)
by tomaszswiderski
- 1 year, 4 months
Use spreadsheet-like tables inside your PDFs
-
Using RML from PHP
(mixed)
by damian
- 1 year, 10 months
This is a sample project which takes user input from an HTML form and generates a PDF containing what the user submitted
-
Creating a PDF in memory from within a web application
(Python)
by damian
- 1 year, 10 months
Simple Django web application view for dynamically creating a PDF from RML
-
Creating a PDF on disk from RML (XML)
(Python)
by damian
- 1 year, 10 months
Simple example using rml2pdf to generate a PDF document on disk from RML
-
Spreadsheet Table for Platypus
(Python)
by tomaszswiderski
- 1 year, 11 months
Evaluate formulas at runtime and repeat bottom rows in ReportLab tables.
-
TOC with clickable links in RML
(XML)
by damian
- 1 year, 11 months
Creates a Table of contents in RML, with clickable links that take you to the appropriate page in the document
-
TOC with clickable links
(Python)
by rptlab
- 2 years
Creates a TOC like snippet 8, but with clickable text
-
Alpha Colours (transparency for cmyk)
(Python)
by rptlab
- 2 years, 1 month
Illustrate alpha for CMYK (actually PCMYK) colors
-
Colourising code with Pygments
(Python)
by rptlab
- 2 years, 1 month
You can easily include colourised code samples in your ReportLab scripts
-
Alpha Colours (transparency)
(Python)
by rptlab
- 2 years, 1 month
Simple usage of transparent colours.
-
Table of contents
(Python)
by rptlab
- 2 years, 1 month
An easy way to generate table of contents.
-
Line Plot
(Python)
by rptlab
- 2 years, 2 months
A line plot with legend
-
A breakdown pie chart
(Python)
by rptlab
- 2 years, 2 months
A breakdown pie chart
-
A Vertical Bar Chart
(Python)
by rptlab
- 2 years, 2 months
Vertical Bar Chart
-
Just another ordinary pie chart
(Python)
by rptlab
- 2 years, 2 months
a basic pie chart made with reportlab library
-
Simple Pie Chart
(Python)
by rptlab
- 2 years, 2 months
Create a simple Pie chart that can save itself into PDF.
