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:
-
Creating a PDF in memory from within a web application
(Python)
by damian
- 5 months, 3 weeks
Simple Django web application view for dynamically creating a PDF from RML
-
Creating a PDF on disk from RML (XML)
(Python)
by damian
- 5 months, 3 weeks
Simple example using rml2pdf to generate a PDF document on disk from RML
-
TOC with clickable links in RML
(XML)
by damian
- 6 months, 1 week
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
- 7 months, 4 weeks
Creates a TOC like snippet 8, but with clickable text
-
Alpha Colours (transparency for cmyk)
(Python)
by rptlab
- 8 months, 2 weeks
Illustrate alpha for CMYK (actually PCMYK) colors
-
Colourising code with Pygments
(Python)
by rptlab
- 8 months, 2 weeks
You can easily include colourised code samples in your ReportLab scripts
-
Alpha Colours (transparency)
(Python)
by rptlab
- 8 months, 3 weeks
Simple usage of transparent colours.
-
Table of contents
(Python)
by rptlab
- 8 months, 3 weeks
An easy way to generate table of contents.
-
Line Plot
(Python)
by rptlab
- 9 months
A line plot with legend
-
A breakdown pie chart
(Python)
by rptlab
- 9 months
A breakdown pie chart
-
A Vertical Bar Chart
(Python)
by rptlab
- 9 months
Vertical Bar Chart
-
Just another ordinary pie chart
(Python)
by rptlab
- 9 months
a basic pie chart made with reportlab library
-
Simple Pie Chart
(Python)
by rptlab
- 9 months
Create a simple Pie chart that can save itself into PDF.
