{"schemaVersion":"1.0","record":{"label":"ReportLab Toolkit","description":"Python PDF-generation toolkit with a drawing canvas and flow-based Platypus page layout.","aliases":["ReportLab Open Source","reportlab"],"kind":"software","website":"https://docs.reportlab.com/reportlab/userguide/ch1_intro/","overview":"ReportLab Toolkit is an open-source Python library for generating PDFs and graphics. It provides a low-level drawing canvas and the higher-level Platypus layout system for assembling flowing content into pages. This article covers the open-source toolkit, whose features and license are distinct from ReportLab's commercial PLUS and RML offerings.","license":"BSD License","lifecycle":"active","example":false,"features":[{"name":"Flow-based document layout","status":"supported","detail":"Platypus processes flowables through frames and page templates.","useCase":"Programmatic PDF generation in Python","platforms":["Python on Linux","Python on Windows","Python on macOS"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.reportlab.com/reportlab/userguide/ch5_platypus/","locator":"Flowables, frames and document templates","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"}]},{"name":"Remote image fetching","status":"limited","detail":"Version 5.0 changes unset trusted-host policy to trust no source, requiring explicit allowed sources.","useCase":"Programmatic PDF generation in Python","platforms":["Python on Linux","Python on Windows","Python on macOS"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.reportlab.com/releases/notes/whats-new-50/","locator":"Trusted resource changes and removed C backends","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"}]},{"name":"Existing PDF import in base toolkit","status":"unsupported","detail":"Vendor distinguishes PDF reading/reuse through commercial PageCatcher from the open-source toolkit.","useCase":"Programmatic PDF generation in Python","platforms":["Python on Linux","Python on Windows","Python on macOS"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.reportlab.com/developerfaqs/","locator":"Open-source toolkit identity, BSD license and PLUS/PageCatcher distinction","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"}]}],"alternatives":[],"slug":"reportlab-toolkit","draftAlternatives":[{"targetSlug":"fpdf2","status":"limited","detail":"Can cover Python-generated documents through canvas or Platypus layout; API, templates and deployment requirements differ.","useCase":"Programmatic PDF generation in Python","platforms":["Python on Linux","Python on Windows","Python on macOS"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.reportlab.com/reportlab/userguide/ch2_graphics/","locator":"Coordinate-based drawing, page size and final saving","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"},{"url":"https://docs.reportlab.com/reportlab/userguide/ch5_platypus/","locator":"Flowables, frames and document templates","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"},{"url":"https://py-pdf.github.io/fpdf2/","locator":"Python PDF generation","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"}]}],"evidence":[{"url":"https://docs.reportlab.com/developerfaqs/","locator":"Open-source toolkit identity, BSD license and PLUS/PageCatcher distinction","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"},{"url":"https://docs.reportlab.com/reportlab/userguide/ch2_graphics/","locator":"Coordinate-based drawing, page size and final saving","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"},{"url":"https://docs.reportlab.com/reportlab/userguide/ch5_platypus/","locator":"Flowables, frames and document templates","retrievedAt":"2026-10-07T12:39:36.466Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://docs.reportlab.com/developerfaqs/","locator":"Open-source toolkit identity, BSD license and PLUS/PageCatcher distinction","retrievedAt":"2026-10-07T12:39:36.466Z","id":"faq","title":"ReportLab developer FAQ","kind":"vendor"},{"url":"https://docs.reportlab.com/reportlab/userguide/ch2_graphics/","locator":"Coordinate-based drawing, page size and final saving","retrievedAt":"2026-10-07T12:39:36.466Z","id":"canvas","title":"ReportLab pdfgen canvas","kind":"vendor"},{"url":"https://docs.reportlab.com/reportlab/userguide/ch5_platypus/","locator":"Flowables, frames and document templates","retrievedAt":"2026-10-07T12:39:36.466Z","id":"platypus","title":"ReportLab Platypus","kind":"vendor"},{"url":"https://docs.reportlab.com/install/open_source_installation/","locator":"Pure-Python base since 4.0 and optional graphics dependencies","retrievedAt":"2026-10-07T12:39:36.466Z","id":"install","title":"ReportLab open-source installation","kind":"vendor"},{"url":"https://docs.reportlab.com/releases/notes/whats-new-50/","locator":"Trusted resource changes and removed C backends","retrievedAt":"2026-10-07T12:39:36.466Z","id":"release","title":"ReportLab 5.0 release notes","kind":"vendor"},{"url":"https://py-pdf.github.io/fpdf2/","locator":"Python PDF generation","retrievedAt":"2026-10-07T12:39:36.466Z","id":"fpdf","title":"fpdf2 overview","kind":"vendor"}],"overviewCitations":["faq","canvas","platypus"],"licenseCitations":["faq"],"sections":[{"id":"canvas","heading":"Drawing individual pages","paragraphs":[{"id":"canvas-detail","content":[{"text":"The pdfgen canvas exposes coordinate-based drawing operations. Programs place text and graphics on a page, advance to subsequent pages and finally save the document. Page dimensions are explicit and affect coordinates and margins. This approach suits precisely positioned output, but it also makes the application responsible for its positioning logic rather than treating the PDF as an editable word-processing document."}],"citations":["canvas"]}]},{"id":"flow","heading":"Flowing content through templates","paragraphs":[{"id":"flow-detail","content":[{"text":"Platypus provides a higher-level document model. A sequence of flowables, such as paragraphs and spacers, is processed through frames and page templates. Page callbacks can draw recurring material independently of the flowing story. Developers can therefore separate content from recurring layout, while still dropping down to canvas drawing when needed. This is a Python object model, not an assertion of compatibility with arbitrary HTML/CSS templates."}],"citations":["platypus"]}]},{"id":"scope","heading":"Open-source and commercial scope","paragraphs":[{"id":"scope-detail","content":[{"text":"The vendor describes the open-source library as BSD-licensed and distinguishes its Python-driven document construction from the commercial RML templating product. Its FAQ also assigns reading and reusing existing PDF content to PageCatcher in ReportLab PLUS. A project that generates new reports and a project that imports existing designed pages therefore have different requirements. Commercial package capabilities should not be assumed to accompany the base reportlab installation."}],"citations":["faq"]}]},{"id":"versions","heading":"Current deployment changes","paragraphs":[{"id":"versions-detail","content":[{"text":"The installation guide says the base moved to pure Python in version 4.0, with optional components for acceleration and graphics. The newer 5.0 release notes supersede older instructions for legacy renderPM C extensions: those backends are no longer offered, while rlPyCairo remains supported. Version 5.0 also changes the meaning of an unset trusted-image-source configuration to trust no source. Applications that fetch remote images must account for that deliberate behavior change."}],"citations":["install","release"]}]},{"id":"comparison","heading":"Substitution considerations","paragraphs":[{"id":"comparison-detail","content":[{"text":"ReportLab Toolkit can substitute for "},{"text":"fpdf2","targetSlug":"fpdf2"},{"text":" in producing PDFs from Python-controlled content. The appropriate comparison is the document model: explicit drawing, flowing stories, fonts and output requirements. Existing fpdf2 code is not directly portable to canvas or Platypus APIs, and any reliance on importing PDFs requires separately established tooling. No rendering or performance comparison was executed for this article."}],"citations":["canvas","platypus","faq","fpdf"]}]}]},"id":"Q177","revision":161,"updatedAt":"2026-10-10T12:15:34Z","sourceUrl":"https://substitutefor.net/entities/Q177?revision=161"}}