Code Snippets
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:
-
4 years, 10 months<p>This simple script illustrates drawing an image on a canvas and overdrawing with text.</p>
-
10 years, 8 monthsCreate fully customized labels for pie charts by changing colors, borders, ...
-
10 years, 9 monthsMore intelligent labelling for pie charts
-
12 years, 8 monthsExample of overprinting inks on top of one another to mix colours.
-
12 years, 8 monthsUse spreadsheet-like tables inside your PDFs
-
13 years, 2 monthsThis is a sample project which takes user input from an HTML form and generates a PDF containing what the user submitted
-
13 years, 2 monthsSimple Django web application view for dynamically creating a PDF from RML
-
13 years, 2 monthsSimple example using rml2pdf to generate a PDF document on disk from RML
-
13 years, 3 monthsEvaluate formulas at runtime and repeat bottom rows in ReportLab tables.
-
13 years, 3 monthsCreates a Table of contents in RML, with clickable links that take you to the appropriate page in the document
-
13 years, 4 monthsCreates a TOC like snippet 8, but with clickable text
-
13 years, 5 monthsIllustrate alpha for CMYK (actually PCMYK) colors
-
13 years, 5 monthsYou can easily include colourised code samples in your ReportLab scripts
-
13 years, 5 monthsSimple usage of transparent colours.
-
13 years, 5 monthsAn easy way to generate table of contents.
-
13 years, 5 monthsA line plot with legend
-
13 years, 5 monthsA breakdown pie chart
-
13 years, 5 monthsVertical Bar Chart
-
13 years, 6 monthsa basic pie chart made with reportlab library
-
13 years, 6 monthsCreate a simple Pie chart that can save itself into PDF.