Skip to main content

The ReportLab PDF library

Project description

(C) Copyright ReportLab Europe Ltd. 2000-2014. See LICENSE.txt for license details.

This is the ReportLab PDF Toolkit. It allows rapid creation of rich PDF documents, and also creation of charts in a variety of bitmap and vector formats.

This library is also the foundation for our commercial product Report Markup Language (RML), available in the ReportLab PLUS package. RML offers many more features, a template-based style of document development familiar to all web developers, and higher development productivity. Please consider trying out RML for your project, as the license sales support our open source development.

Contents of this file:

  1. Licensing

  2. Installation

    2.1 Source Distribution or Subversion

    2.2 Manual Installation without C Compiler (e.g. Windows)

    2.3 easy_install

    2.4 Windows .exe Installer

    2.5 Ubuntu and other Debian-based Systems

  3. Prerequisites / Dependencies

  4. Documentation

  5. Acknowledgements and Thanks

1. Licensing

BSD license. See LICENSE.txt for details.

2. Installation

In most cases, easy_install reportlab or pip install reportlab will do the job. Full details follow below for each platform.

2.1 General prerequisites

You need to have installed Python (versions 2.5 through 2.7), and ideally PIL with Freetype support; more notes on prerequisites follow below.

2.2. Where to get the code

Daily and release builds are available from ReportLab’s open download area:

http://www.reportlab.org/ftp/

Daily builds will unzip/untar to produce a dated directory e.g. reportlab-YYYYMMDD/ but are otherwise structured just like the Mercurial repository and release builds.

Releases are also available from the Python Package Index:

http://pypi.python.org/

From March 2013, the code is being hosted in Mercurial on BitBucket. You can obtain the latest code from our Mercurial repository with:

hg clone http://bitbucket.org/rptlab/reportlab

Users of our commercial libraries, and/or anyone who registers on our site, can also access our commercial area which has exactly the same packages, paired with the matching commercial ones (rlextra); it is important to keep both in sync.

2.3 Windows Installer

A binary .exe installer for Windows (built with distutils) is available on our website. This will install the ‘reportlab’ package into your site-packages area (e.g. C:\Python27\lib\site-packages).

This will NOT install the tests, examples and documentation. If you want to learn your way around the package or do development with it on Windows, we suggest you also download a source copy, unzip it and work with the examples/tests within that directory.

2.4 Mac OS

On Mac OS, you will need XCode with the Command Line Tools option installed in order to compile the C extensions. On Lion or later, type clang at a prompt; if you get command not found or similar, the C compiler is not installed.

We then recommend the brew installation tool to fetch open source packages. You should run:

brew install freetype

before instaling reportlab to ensure that the Python Imaging Library gets compiled with JPEG support.

Thereafter, you can install with easy_install reportlab or by fetching the source and using python setup.py install

2.5 Unix / Linux

On Unix and Mac OS we assume a C compiler is available to compile the C extensions.

On Ubuntu, you will need build-essential, libfreetype6-dev, python-dev and python-imaging. Most other Linux and xBSD distributions have packages with similar names.

Thereafter, you can use easy_install reportlab, pip install reportlab, or fetch the source and use python setup.py install.

From Ubuntu 12.04 desktop onwards, a copy of reportlab is already installed. Take care not to confuse it with any releases you download.

3. Prerequisites / Dependencies

This works with Python 2.5 - 2.7. Older versions are available going back to Python 1.5 or thereabouts.

There are no absolute prerequisites beyond the Python standard library; but the Python Imaging Library (PIL) is needed to include images other than JPG inside PDF files.

The C extension are optional but anyone able to do so should use _rl_accel as it helps achieve acceptable speeds when wrapping paragraphs and measuring text string lengths. The _renderPM extension allows graphics (such as charts) to be saved as bitmap images for the web, as well as inside PDFs.

4. Documentation

Naturally, we generate our own manuals using the library. In a ‘built’ distribution, they may already be present in the docs/ directory. If not, execute python genAll.py in that directory, and it will create three PDF manuals:

reportlab-userguide.pdf
reportlab-reference.pdf
reportlab-graphics-reference.pdf

These are also available in daily build form from the documentation page on our web site. The manuals are very useful ‘how-to’ examples if you are aiming to create long documents.

5. Test suite

Tests are in the tests/ directory. They can be executed by cd’ing into the directory and executing python runAll.py, or from python setup.py tests.

The tests will simply try to ‘import reportlab’. Be warned that if you already have a copy of reportlab installed (which happens by default in Ubuntu 12.04 desktop), it may try to run the installed reportlab and cause permission errors as it can’t generate PDF files without sudo rights.

If you do not have a copy insralled and run them prior to installation/compilation, there may be one or two failures from tests which exercise the C extensions that have not been compiled.

The tests mostly produce output files with the same name as the test, but extension .pdf. It is worth reviewing the list of test scripts as they provide valuable ‘how to’ information.

If you have no internet connection, one or two tests may fail where we try to load images from URLs. This is normal. The next release of this package will silently skip such tests using features only available in Python 2.7.

6. Demos

A small number of demo programs are included in demos/, none of which are particularly exciting, but which may have some intructional value. These were the first programs we wrote back in 2000.

The odyssey demo serves as our benchmark suite. If you download the full Odyssey text, you can generate a PDF of Homer’s Odyssey with either (a) no wrapping, (b) simple paragraphs or (c) paragraphs with enough artificial markup (bold/italic on certain words) to exercise the parser.

7. Acknowledgements and Thanks

lib/normalDate.py originally by Jeff Bauer.

Many, many contributors have helped out between 2000 and 2013. We try to keep a list in the first chapter of the User Guide; if you have contributed and are not listed there, please let us know.

Project details


Release history Release notifications | RSS feed

This version

3.0

Download files

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

Source Distribution

reportlab-3.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distributions

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

reportlab-3.0.win-amd64-py3.3.msi (2.2 MB view details)

Uploaded Source

reportlab-3.0.win-amd64-py3.3.exe (2.3 MB view details)

Uploaded Source

reportlab-3.0.win-amd64-py2.7.msi (2.2 MB view details)

Uploaded Source

reportlab-3.0.win-amd64-py2.7.exe (2.4 MB view details)

Uploaded Source

reportlab-3.0.win32-py3.3.msi (2.1 MB view details)

Uploaded Source

reportlab-3.0.win32-py3.3.exe (2.3 MB view details)

Uploaded Source

reportlab-3.0.win32-py2.7.msi (2.1 MB view details)

Uploaded Source

reportlab-3.0.win32-py2.7.exe (2.3 MB view details)

Uploaded Source

reportlab-3.0-cp33-none-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.3Windows x86-64

reportlab-3.0-cp33-none-win32.whl (2.0 MB view details)

Uploaded CPython 3.3Windows x86

reportlab-3.0-cp27-none-win_amd64.whl (2.1 MB view details)

Uploaded CPython 2.7Windows x86-64

reportlab-3.0-cp27-none-win32.whl (2.0 MB view details)

Uploaded CPython 2.7Windows x86

File details

Details for the file reportlab-3.0.tar.gz.

File metadata

  • Download URL: reportlab-3.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for reportlab-3.0.tar.gz
Algorithm Hash digest
SHA256 a8a75186a9f2cc219c9fee5ec52ae4e18084783906b6345109770ff933bed86f
MD5 a4fd40abcfb604aa3bd907181133c071
BLAKE2b-256 1cfeb8723d3f142e391478415fbab0bfb8cd0260fb2f979e0c337862b3110c1d

See more details on using hashes here.

File details

Details for the file reportlab-3.0.win-amd64-py3.3.msi.

File metadata

File hashes

Hashes for reportlab-3.0.win-amd64-py3.3.msi
Algorithm Hash digest
SHA256 96e52b4e936eb14e2b9913477c81829e3ca87b7d03335125d181af981ff2b718
MD5 e1b5c68197b36a5dc3d4e0b42c8ade9d
BLAKE2b-256 a92847a91deaffc9481165d8014d9065ae6737572a37e9fdd520a7fcd834a8fb

See more details on using hashes here.

File details

Details for the file reportlab-3.0.win-amd64-py3.3.exe.

File metadata

File hashes

Hashes for reportlab-3.0.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 f57515198147ae1b61f418d557a22dce8101ebf90e9688e5dd4b46aad688ea9d
MD5 5249fce088804ea84a1e3ab46e6087b6
BLAKE2b-256 bcaacf35ca141ae6ef8bfe5abfa1c8641b4e4301b4ce2c16abd8e4845842ce07

See more details on using hashes here.

File details

Details for the file reportlab-3.0.win-amd64-py2.7.msi.

File metadata

File hashes

Hashes for reportlab-3.0.win-amd64-py2.7.msi
Algorithm Hash digest
SHA256 d777ce441589054eea891c4eeac4ddf29b36bc1dcd232d5a648a811059322b80
MD5 11dd613859dce60f8e45370d2cb5d5f4
BLAKE2b-256 90aa84905d4f769b7722f394c65df3b100818fba442faf58424958a0ea4effe7

See more details on using hashes here.

File details

Details for the file reportlab-3.0.win-amd64-py2.7.exe.

File metadata

File hashes

Hashes for reportlab-3.0.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 fd33b8814dd559c8a640bef66d27d3b2dc17cd95f50ce9bc83ff299b5a459687
MD5 e0bf66eca863c8388dda4bcfd8db16eb
BLAKE2b-256 bbc0056af6f92442e661206720f28c6f5d7321e86b179651bcae6f1eac4c5ea3

See more details on using hashes here.

File details

Details for the file reportlab-3.0.win32-py3.3.msi.

File metadata

File hashes

Hashes for reportlab-3.0.win32-py3.3.msi
Algorithm Hash digest
SHA256 78fe6fa0cf888db75fed98c96ff2e1ef79ea2f2745dc6fad3322a1ad39975bc0
MD5 514a3c3945dc0f57b1d74e0084f8ea12
BLAKE2b-256 6b7b76018d9f353d79ed46d967c76be8b205717d9143f4d2345b99750e68aef1

See more details on using hashes here.

File details

Details for the file reportlab-3.0.win32-py3.3.exe.

File metadata

File hashes

Hashes for reportlab-3.0.win32-py3.3.exe
Algorithm Hash digest
SHA256 4966eafcab4c5c162fa40f65218547366cb45498aca5e416bddec1c2263256e1
MD5 3c4ffc6814ed2462995d129295473c00
BLAKE2b-256 05e121ca4b264fec9c747c989882b5588cd3f6e6f682ee1ee73d833efcbeca1e

See more details on using hashes here.

File details

Details for the file reportlab-3.0.win32-py2.7.msi.

File metadata

File hashes

Hashes for reportlab-3.0.win32-py2.7.msi
Algorithm Hash digest
SHA256 4e1b44105ac8bc8a8b80d634776767b9dbf292f43917360607c2918a2a44a7b4
MD5 0be80a725e97ef987989efb7bb06cb86
BLAKE2b-256 c91328c3a8575839814b4eef31166bb95d570f3ca7f131b3ffae9fbde1ac43f3

See more details on using hashes here.

File details

Details for the file reportlab-3.0.win32-py2.7.exe.

File metadata

File hashes

Hashes for reportlab-3.0.win32-py2.7.exe
Algorithm Hash digest
SHA256 98b93a28c817c863d0f138d2250d9b30d1d4900f40255ca9a37fbb1f6aa9941f
MD5 bafea1c0d15b1ce96471e48bd74b6042
BLAKE2b-256 42d1375d18a576e790430a14226dd47c58cedb6208ebba833b463026c2c2ae94

See more details on using hashes here.

File details

Details for the file reportlab-3.0-cp33-none-win_amd64.whl.

File metadata

File hashes

Hashes for reportlab-3.0-cp33-none-win_amd64.whl
Algorithm Hash digest
SHA256 6c3ffbf1680bc3fc2926a9389feb8168001fb94d69922f640dfeb68389ac8d69
MD5 352c0742606bcfa2b7126f0e877cad6b
BLAKE2b-256 b12927e12d381f49389c91609fff219a84033134c1314862dc16432c06ba689a

See more details on using hashes here.

File details

Details for the file reportlab-3.0-cp33-none-win32.whl.

File metadata

File hashes

Hashes for reportlab-3.0-cp33-none-win32.whl
Algorithm Hash digest
SHA256 6c95a7da54bac533c73cfd133f0af9ff8335982000367b46edae94137d83ce19
MD5 7535fe3ca78adf72edb2b6f60c9aaeb1
BLAKE2b-256 4cbfa35e2effa52c188d028b5da0ed633d5f42e7ac21d664a0a3e37ae4ea5455

See more details on using hashes here.

File details

Details for the file reportlab-3.0-cp27-none-win_amd64.whl.

File metadata

File hashes

Hashes for reportlab-3.0-cp27-none-win_amd64.whl
Algorithm Hash digest
SHA256 a6eed63d1f5a03b4adc68e316eb6424e2ffd55feaf555f16b29e937953a83eb4
MD5 530fe3e133a1310170f2dc3b0f431cf9
BLAKE2b-256 4d64e0901542851f788840a7afa8d15684939a6ba659c5607fc76f1d64af9438

See more details on using hashes here.

File details

Details for the file reportlab-3.0-cp27-none-win32.whl.

File metadata

File hashes

Hashes for reportlab-3.0-cp27-none-win32.whl
Algorithm Hash digest
SHA256 8abe1f24e1de0a9403aa4cae24217f7481a8e8adcc0a02abea9a2be4bd0fae7d
MD5 f0498262ce03674513e19dd8c62950a6
BLAKE2b-256 b7702ec5422637c87d12f4d0dab5f934da6afec729ef9a3693af768652fc1130

See more details on using hashes here.

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