Skip to content

What'S New In Reportlab 2.6

ReportLab PLUS 2.6 was released on 1st October 2012. Read on for new features....

REPORTLAB PLUS

ReportLab PLUS is our combined distribution containing RML, PageCatcher, Diagra and our other supporting libraries. It delivers an importable Python package called 'rlextra' which works with the open source 'reportlab' package, whose changes are covered below.

This works with Python versions 2.5, 2.6 and 2.7. We do not yet support Python 3.

GENERAL CHANGES

  • Manuals and user guides have been reviewed, expanded, and reformatted with more pleasing code snippets and tables of contents

REPORT MARKUP LANGUAGE (RML)

  • Inline bitmap images are supported within text
  • Optional line wrapping for preformatted paragraphs (e.g. for code snippets with long lines)
  • Trailing dots can be added to paragraph styles to improve tables of contents

DIAGRA/GUIEDIT

  • Diagra's SVG output improved – see why this is important below
  • Intelligent pie chart labels. We can now auto-rotate pies to make sure most slices are near the sides, and draw call-out lines and labels which are arranged neatly in a column down each side. This avoids the need to have separate legends. Check the code snippet here
  • Pie charts – behave sensibly when there is only one 360 degree slice
  • Fully customized labels for many chart types – check the code snippet here
  • Lineplot background can now be rectangular

WHY ARE RETINA DISPLAYS INCREASING USE OF SVG IMAGES?

The latest Apple iPads and Macbooks are equipped with 'retina' displays – very high resolution screens that result in a high quality experience for viewers. However, static size textures and bitmaps – how charts and logos are currently displayed – are suffering, as they can look fuzzy and shoddy on these new displays. One workaround is to use vector graphics – images that keep their sharpness no matter the image size. ReportLab's graphics module can output fully resizeable SVG images. This makes it an even better solution for financial charts on web sites.

OPEN SOURCE - REPORTLAB TOOLKIT

There are a number of minor enhancements, and a larger number of previous-undocumented enhancements which we have documented better. Thanks to everybody who has contributed to the open-source toolkit in the time leading up to this 2.6 release, whether by reporting bugs, sending patches, or contributing to the reportlab-users mailing list. Major contributors are credited in the user documentation.

PDF

  • Added support for HTML-style list objects
  • Added flexible mechanism for drawing bullets
  • Allowed XPreformatted objects to use Asian line wrapping
  • Added an 'autoNextPageTemplate' attribute to PageTemplates. For example you can now set up a 'chapter first page template' which will always be followed by a 'continuation template' on the next page break, saving the programmer from having to issue control flow commands in the story.
  • Added a TopPadder flowable, which will 'wrap' another Flowable and move it to the bottom of the current page.
  • Trailing dots can be added to paragraph styles to improve tables of contents
  • More helpful error messages when large tables cannot be rendered

CHARTS

  • Support for UPCA bar codes
  • Axes - added startOffset and endOffset properties; allowed for axis background annotations.
  • Bar charts - allow more control of z Index (i.e. drawing order of axes and lines)
  • Pie charts - fixed bugs in 3d appearance
  • SVG output back end has seen some bugs fixed and now outputs resizeable SVG