Skip to main content

The ReportLab Toolkit (Enhanced Fork)

Project description

reportlab-enhanced

中文

An enhanced fork of ReportLab — the open-source Python library for generating PDF documents, charts, and vector graphics.

Features

  • Generate rich PDF documents with text, images, tables, and charts
  • High-level layout engine (Platypus) with flowables, frames, and page templates
  • Low-level Canvas API for direct PDF drawing operations
  • Charts and graphics with SVG/PS/bitmap rendering support
  • TrueType and Type1 font handling
  • Enhanced: TrueType font fallback support for missing glyphs
  • Pure Python (no C extensions required since v4.0)
  • Python >= 3.9

Enhancements over upstream

This fork builds on ReportLab 4.x with additional features:

  • TTFont Fallback: Automatic font fallback for missing glyphs in TrueType fonts, controlled via environment variable REPORTLAB_FONT_FALLBACK=1
  • Active development with improvements to font handling and CJK support

See CHANGES.md for the full changelog.

Installation

pip install reportlab-enhanced

For development:

git clone https://github.com/selcarpa/reportlab_enhanced.git
cd reportlab-enhanced
pip install -e .

Optional dependencies

pip install reportlab-enhanced[accel]      # rl_accel acceleration
pip install reportlab-enhanced[renderpm]   # rl_renderPM bitmap rendering
pip install reportlab-enhanced[pycairo]    # Cairo-based rendering
pip install reportlab-enhanced[bidi]       # Bidirectional text support
pip install reportlab-enhanced[shaping]    # HarfBuzz text shaping

Quick Start

from reportlab.lib.pagesizes import A4
from reportlab.pdfgen import canvas

c = canvas.Canvas("hello.pdf", pagesize=A4)
c.drawString(100, 750, "Hello, reportlab-enhanced!")
c.save()

For the high-level Platypus API:

from reportlab.lib.pagesizes import A4
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet

doc = SimpleDocTemplate("doc.pdf", pagesize=A4)
styles = getSampleStyleSheet()
story = [Paragraph("Hello, reportlab-enhanced!", styles["Title"])]
doc.build(story)

Documentation

The original ReportLab documentation is available at docs.reportlab.com.

To build the included PDF manuals:

cd docs && python genAll.py

This generates three PDF references in the docs/ directory.

Development

This project extensively uses vibe coding with Claude Code (Anthropic Claude) as a development partner for code generation, refactoring, and documentation.

Running tests

python setup.py tests-preinstall
# or
cd tests && python runAll.py

Contributing

Contributions are welcome! Please open an issue or pull request on GitHub.

Acknowledgements

This project is a fork of ReportLab by ReportLab Inc., originally created by Andy Robinson, Robin Becker, and the ReportLab team. The upstream project has been developed since 2000 and provides the foundation for this enhanced version.

License

BSD License. See LICENSE for details.

  • Copyright (c) 2025-2026, selcarpa
  • Copyright (c) 2000-2024, ReportLab Inc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reportlab_enhanced-0.0.1.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reportlab_enhanced-0.0.1-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file reportlab_enhanced-0.0.1.tar.gz.

File metadata

  • Download URL: reportlab_enhanced-0.0.1.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for reportlab_enhanced-0.0.1.tar.gz
Algorithm Hash digest
SHA256 056664ca5f046eac01e5d377bb9be7519e59e5f028590ab0fca5e269b7750325
MD5 3a5cca00540e725b5881d9824fd6b6fb
BLAKE2b-256 4aba9efb75bd5bbe6c30b2a9b379a3dc683a2557aaf05a7694751f109896f107

See more details on using hashes here.

Provenance

The following attestation bundles were made for reportlab_enhanced-0.0.1.tar.gz:

Publisher: release.yml on selcarpa/reportlab_enhanced

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reportlab_enhanced-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for reportlab_enhanced-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ea0e8861a25f4e20269c1d48bea35e99da8975abddf103551e58d50116bc562
MD5 1466c37dfaa5668b9ae8d75953c63e29
BLAKE2b-256 6d84f4f15d6a61b5f58b6fd2d46a4a48c141bd20e7e0c080780551bd4aeba638

See more details on using hashes here.

Provenance

The following attestation bundles were made for reportlab_enhanced-0.0.1-py3-none-any.whl:

Publisher: release.yml on selcarpa/reportlab_enhanced

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page