Release Notes

 

What's New in ReportLab 2.2

These releases took place one year after 2.0 (May 2006). Inevitably, just as we had packaged 2.1 and commenced testing but before we had broadcast it, an urgent feature request came up and so 2.2 needs to be issued shortly. This release represents a steady accumulation of minor changes over the past year, rather than any major changes.

New Features

RML

  • Addition of <registerFontFamily> tag: Added just after 2.1, this lets you group fonts into families according to their bold and italic properties, so that the <b> and <i> tags do the right thing within paragraphs.
  • Addition of <br> tag: By popular acclaim, you can now add literal line breaks. This is intended to "start a new line" with the current line spacing, not to create a paragraph-like gap. You can also combine whitespace in an <xpre> tag before a <br> tag to create manually indented lists.
  • Addition of subject and keywords attributes in template: These two attributes can be set, and will show up in the PDF file's document info (along with Author and Title which were already defined)
  • addition of anchor and pdfBoxType for PDF images: You can now use small PDF files as images (for example, distilling an EPS logo from a client) using the normal image tag. When the image is set within a predefined bounding box using preserveAspectRatio, an anchor attribute specifies how it is anchored, using 'compass points': 'n' for north, 'ne' for north-east (i.e. top right corner). In addition, some PDF files may define different 'box types' to designate the rectangle the designer intended. If you're trying to position some PDF artwork then you can specify whether to use the MediaBox (the default, always defined) or the optional CropBox, TrimBox, BleedBox or ArtBox.
  • <barCode> and <barCodeFlowable>: These two tags make it very easy to create barcodes in RML documents - either at fixed locations, or flowing between paragraphs. See the DTD for the full list of attributes. Codes presently supported include I2of5, Code128, Standard93, Extended93 | Standard39, Extended39, MSI, Codabar, Code11, FIM, POSTNET and USPS_4State
  • border properties for paragraph styles: Paragraph styles have four new properties: borderWidth, borderColor, borderRadius and borderPadding. These do pretty much as you would expect, and make it easier to create attractive headings and separators in the stylesheet.
  • <imageFigure> tag: This lets you quickly add an image or PDF page into a document as images (or diagrams) are commonly displayed within the story, with controllable padding and a caption above or below.
  • suppressFirst for page breaks: This new attribute for the nextPage and condPageBreak tag provides support for a common situation: you might want a page break before each major heading, except when it appears at the very beginning of a document.
  • template attribute for <includePdfPages>: The includePdfPages tag can now be told to use a particular template together with each page pulled in. This would let you, for example, consistently frame other PDF content with your own headers and footers with minimal effort.
  • expanded attributes for <a> tag
  • The a (hyperlink) tag now supports fontSize, fontName, name (for HTML compatibility) and backcolor.
  • Control over increment when numbering: The seq tag, used to auto-generate numbers for multi-level lists, now has an inc attribute (for "increment"): which lets you control the numbers - counting up or down as desired. If not set, usually counters increment by 1.
  • Table row requires a cell: The tr tag used to permit no content at the parser level, but expected cells later on in the code. The XML parser now requires at least one table call tag (td) per row.
  • Lots more HTML entities: We've added a large number of character entities, including those commonly found in HTML. You can now use standard entity names for typographers' symbols, special quotes and so on.

Diagra

  • The quickChart API has undergone further refinements to improve the automatic layout of many chart types.
  • The layout of Diagra Drawing Editor has changed significantly so that the Canvas has a large window pane
  • A new pane is added for help messages related to the selected attribute, most attributes have help messages.

Bug fixes

  • Fixed many old documentation and installation issues
 

What's New in ReportLab 2.3

What's new in Version 2.3 - 4 Feb 2009

New Features since v.2.2

Release 2.3 of the Reportlab commercial toolkit sees a host of bugfixes along with some useful new additions to Report Markup Language.

  • Firstly, we have dramatically simplified and improved the installation experience, with new 'all in one' installers for Windows users which are backwards compatible to Pythonv2.3. Installation instructions are now clearer, simpler and easier to follow.
  • Encryption has now been removed from the commercial toolkit and added to the open source software, so a license is no longer required to use this feature.

Report Markup Language:

  • Conditional Formatting

    • The major new feature for v2.3 is conditional formatting, which allows you to include and exclude content dynamically, based on factors you might not know in advance, such as the number of pages in your document, or the remaining space left on a page. This allows for far more flexibility in your layouts which can now change as required according to dynamic content.
  • For instance, you might want to pad a document to ensure an even number of pages for printing, or include an illustration depending on whether enough space is available on a page. Such calculations would previously have required complicated programming but are now available with just a few lines of RML.

  • The new tags are documented in the RML Userguide, and an example can be found in test case 39

  • Extra elements added to the <checkBox> tag

    • The new <label> and <labelOffset> tags allow you to easily give your checkboxes an accurately positioned label.
  • <Image> tag improved

    • This release sees a change to the behaviour of the preserveAspectRatio attribute of the <Image> tag
 

What's New in ReportLab 2.4

What's new in Version 2.4 - 21st Jan 2010. This covers both our open source and commercial software, which are always released together.

ReportLab PLUS

The ReportLab PLUS package is our new name for the 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.

We have switched to a new license file format. All the old license files will no longer work with version 2.4. Any customer with old-style license files should email us when upgrading and we can provide a new-style license file. This allows us to properly handle more customers situations, and only one file is needed (rather than separate RML, PageCatcher and Diagra licenses in the past).

Report Markup Language (RML)

The main new features in RML aim to make long documents easier to generate, and to facilitate professional printing. There is an example script in rlextra/examples/longdoc which shows several of these features.

New attributes

  • pageNumber - countingFrom : in many longer documents, the page with '1' at the bottom is not actually the first page, coming after covers and prefaces. To correct for this we used to put nasty arithmetical expressions inside the pageNumber tag. One can now add a simple numeric offset.
  • lineStyle - dash : you can easily apply dash styles to the lines between the cells in tables
  • includePdfPages - sx, sy, dx, dy, degrees : when pulling in a page of an existing PDF document, you can scale it, shift it and rotate it. This is very useful if the pages to be included are slightly different in size or need to be minimised.
  • docinit - useCropMarks : this will make the page size larger and add printer's crop marks, without you needing to change any of your markup. This makes it much easier to generate documents which work for both electronic delivery and professional printing, without needing to recalculate the positions of all the elements.

New elements (with attributes in brackets)

  • headers h4, h5 and h6 : we previously supported h1 to h3 as synonyms for &lt:para style="hN"> we've added three more for HTML compatibility, along with sensible default styles.
  • cropMarks(borderWidth, markWidth, markColor, markLength) - this can be used to modify the default printers' crop marks which appear when docinit.useCropMarks is set
  • startIndex(name, offset, format) - we've added a new mechanism to generate indexes, as commonly seen in the backs of books and catalogues. These three tags work together. There is a good example of how to build an index in rlextra/examples/longdoc
  • index(name, item, offset, format)
  • showIndex(name, dot, style, tableStyle, headers)
  • onDraw(name, label) - this is a callback mechanism for advanced use, making it possible to respond to events while drawing paragraphs. It has been used for the index functionality, and can also

Other features

  • CSS3 color values are supported for our color attributes (rgb, rgba, hsl, hsla). This brings the new alpha functionality to RML.
  • We now have support for colour-separated PDF output. This is working in production for a major client, and is easy to use, but the API has not been "frozen" yet as we're taking advice on the best way to use it. If you have a use for this, please email us and we'll let you know what to do.

Diagra

  • New layout for the drawing editor window where you could see all panes easily.
  • Almost all attributes have help messages now.

Page Catcher

  • Support for encrypted PDF files. If a file has been protected (e.g. with an owner password to lock against modification), you can now process the file if you supply the password
  • Support for modern versions of PDF file formats.

Open Source - ReportLab Toolkit

Many new features have been added and numerous bugs have been fixed. A scan of the RML features above will give you an idea as most things have their counterpart in the open source package. Thanks to everybody who has contributed to the open-source toolkit in the run-up to the 2.4 release, whether by reporting bugs, sending patches, or contributing to the reportlab-users mailing list. Thanks especially to the following people: PJACock, Hans Brand, Ian Stevens, Yoann Roman, Randolph Bentson, Volker Haas, Simon King, Henning Vonbargen, Michael Egorov, Mike Folwell and Roberto Alsina.

Thanks also to the guys working on RTL support, which is on a branch for now, but will hopefully feature in the next one: Hosam Aly, Yoann Roman, Muayyad AlSadi.

If we missed you, please let us know!

New Features

  • Reportlab 2.4 is installable with easy_install. You must have a compatible C compiler installed and the dependencies such as Freetype and PIL.

PDF

  • Canvas automatic cropmarks
  • RGB alpha colours - colours can now be transparent with an alpha value.
  • CMYK overPrint - physical colour mix in the printer - similar to RGB alpha but used in professional printing.
  • Colours module has a fade function that returns a list of different shades made up of one base colour.
  • Unicode font file names are now accepted
  • Lots of improvements and verbosity to error messages and the way they are handled.
  • Font size can now be specified in pixels

Platypus

  • Added support for styles h4-h6
  • Improved support for onDraw and SimpleIndex
  • Add support for index tableStyle
  • Added an alphabetic grouping indexing class
  • Added support for multi-level and alphabetical indexes
  • Added support for an unlimited number of TOC levels with default styles
  • Index entries can now be clickable.
  • You can colourise Python code if you have Pygments installed

Graphics:

  • Chart axes values can be reversible.
  • Labels on the axes can now be drawn above or below the axes (hi or low).
  • A per swatch callout is now allowed in the legend.
  • A new anchoring mode for string 'numeric' that align numerical strings by their decimal place.
  • Drawing has a resized method now to change the size dynamically.

Bug fixes

  • word counting in complex paragraphs has been fixed.
  • SimpleIndex and TableOfContents bugs have been fixed.
  • Fix for position of hyperlinks when crop marks are added.
  • flowables.py: fix special case of doctemplate with no frames
  • PDFFormXObject.format missing Resources bug patch from Scott Meyer
  • KeepInFrame justification bug has been fixed.
  • paragraph.py: fix linebreaking bug thanks to Roberto Alsina
  • Fix unicode/str issue bug found by Michael Egorov
  • YCategoryAxis makeTickLabels fix contributed by Mike Folwell
  • pdfdoc.py: fix wrong PDFDate contributed by Robert Alsina
  • and others ...
 

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
 

What's New in ReportLab 2.7

released 4th April 2013

This release, 2.7, is the last major one to support Python 2.5 and 2.6 (and also works on 2.7).  It contains a small number of fixes and additions since our last release in September 2012.  You may think of it as a 'long term stable' branch - if key bugs emerge we will issue 2.7.1, 2.7.2 releases and so on. 

General Changes

We have our eye on a number of key goals, namely introducing Python 3 support and modernising the ReportLab code base. As a first step down this road, this release will introduce a few structural changes to our packages in addition to functional features.

ReportLab is now on Bitbucket

The definitive repository for our open souce library, reportlab, is now a mercurial repository hosted on Bitbucket. This provides a public issue tracker and wiki, and will hopefully encourage more people to contribute to the open source code.

Preppy is now an external dependency

For those using our templating language, preppy, the code is now in a totally separate repository, again hosted on Bitbucket.  It is also released on PyPI so you can do easy_install preppy or pip install preppy.  Docs are rewritten, much more helpful, and up on http://preppy.readthedocs.org/

Practically, this change will mean that instead of importing it like this..

from rlextra.preppy import preppy

..you will need to use..

import preppy

rlextra structural changes

Our commercial python package, rlextra, has also been migrated to a private mercurial repository. Practically, this will have no impact on our users as it will still be accessible from our devnet page as packaged builds.  However, the directory structure inside has changed to split off the demos and documentation from the code.  rlextra depends on reportlab, preppy and pyRXP, all of which can be installed with pip or easy_install; and if you want to place the rlextra-*.tar.gz on an internal URL, you can use the same tools to install it on servers. 

For companies working closely with us and needing frequent access to builds, we can provide direct access to the repo.

New ReportLab PLUS Features

Diagra / Drawing Editor

  • Allow for adding / editing simple doc strings, to allow chart galleries to be well documented and still editable in the GUI
  • New feature to skip columns in data with Null values rather than raising an error and halting the job
  • New feature to specify a (regex based) pattern to skip unwanted lines in CSV files.  This can be used to skip over records which should not result in charts.
  • A Simplify on Save feature automatically cleans up the chart modules on save, removing redundant or duplicated text.  This prevents the clutter that tended to accumulate in chart modules over months or years of edits.
  • Added explicit support for extra font paths in the GUI, so you can tell it where your custom fonts live.

Report Markup Language (RML)

  • The list tags, <ul> and <ol>, were undocumented in the last release but can now be considered final.  There is more documentation, especially in test_046_lists.rml.  The default bullet character for <ul> is now a proper small bullet, rather than a large circle.
  • Fixed some Table Of Contents layout issues with the ability to do trailing dots in Asian languages.

pageCatcher

  • Minor bug fix when reading in pages with page annotations

Open Source - ReportLab Toolkit

Charts / graphics

  • Added SimpleTimeSeriesPlot
  • added _computeMaxSpace
  • added in lineStyle (for bars)
  • improved SVG rendering
  • Pie Chart now has an 'innerRadiusFraction' to allow doughnut-like appearance for 2d charts  (it has no effect with 3d charts).  The separate 'doughnut' chart lacks many pie chart features and should only be used if you wanted multiple nested doughnuts. 
  • Bug fixes:
    • piecharts.py: fix Pie3d __init__ to call its superclass
    • linecharts.py: fix swatch creation
    • fixed y axis in the simple time series plot

PDF

  • Fixes to testshapes & pdfform resetting
  • colors.py
  • various minor fixes

Platypus

  • Defined a small bullet rather than a big circle as the default for unordered lists
  • fixed attribute spelling bug
  • fixed CJK + endDots

Acknowledgements

Many thanks to Andrew Cutler, Dinu Gherman, Matthias Kirst and Stephan Richter for their contributions.

 

 

 

 

 

What's New in ReportLab 3.0

released 14th February 2014

This is our first major release in eight years.   It runs on Python 2.7+ and 3.3+ using the same source code.  

There are no deliberate API changes; we expect that most applications using reportlab will run seamlessly.  However, the internals have been extensively rewritten, and anyone relying on internal details may find changes.

Our open source package, reportlab, is production ready.  A preview version of our commercial package, rlextra, is available to customers on request and will undergo a few more weeks of testing and some documentation updates.  There will be a coordinated release of the two (probably labelled 3.1) shortly.

Installation

We aim to completely follow modern Python packaging standards.  All versions are available on PyPI and in our downloads area.  Source code and issue tracker are still on BitBucket.  You can install with any of the usual techniques:

  • download a Windows installer
  • get source and run python setup.py install
  • easy_install reportlab
  • pip install reportlab==3.0

The only dependency is the Python Imaging Library, usually repackaged as "pillow" 

Changes

  • Python 3.x compatibility. A single line of code should run on 2.7 and 3.3
  • __init__.py restricts to 2.7 or >=3.3
  • __init__.py allow the import of on optional reportlab.local_rl_mods to allow monkey patching etc.
  • rl_config now imports rl_settings & optionally local_rl_settings
  • ReportLab C extensions now live inside reportlab; _rl_accel is no longer required. All _rl_accel imports now pass through reportlab.lib.rl_accel
  • xmllib is gone, alongside the paraparser stuff that caused issues in favour of HTMLParser.
  • some obsolete C extensions (sgmlop and pyHnj) are gone
  • Improved support for multi-threaded systems to the _rl_accel extension module.
  • Removed reportlab/lib/ para.py & pycanvas.py. These would better belong in third party packages, which can make use of the monkeypatching feature above.

New features

  • Add ability to output greyscale and 1-bit PIL images without conversion to RGB. (contributed by Matthew Duggan)
  • highlight annotation (contributed by Ben Echols)

 

 

What's New in ReportLab 3.1

released 22nd April 2014

In the past year we have redeveloped our package to work on Python 2.7, 3.3 and 3.4.  We publicly released the open source code as version 3.0 on 14 February 2014, and have been quietly testing the commercial package which sits on top of it.   Release 3.1.x covers both the Open Source and Commercial packages.

Changes to commercial package since 2.x series

Our main focus is to make our commercial package extremely easy to try out.  We hope that many open source users will give it a go, and see how easy it is to develop rich document workflows quickly using Report Markup Language.  

  • Everything runs under Python 2.7, 3.3 and 3.4.  
  • Follows modern Python standards, including one-line installation using pip or easy_install.   Please see the installation instructions.
  • a functioning rml2pdf command to let you try converting files immediately.
  • A private repository integrated with the web site - use your web site login to download packages.
  • A freely available repository of example files and solutions.

We believe we have preserved compatibility at the application level - all reasonable RML files should convert as before and existing clients should be safe to upgrade.

Changes to open source code since 3.0

If you are running ReportLab 3.0.x, the changes are minor.   If you are running reportlab 2.x, please see the previous release notice

  • support for emoji - characters outside the Unicode basic multilingual plane
  • improved pip-based installers will pull in all the needed dependencies.  Pillow 2.4 appears to deal with all our issues.

Note on version numbers

We follow Python's scheme with 3-point release numbers signifying major-minor-patch.  Generally, new features will result in an announced minor release such as "3.1" or "3.2".  In the last two months our focus has been on how well the packages install, so we went through a number of releases (3.1.1 up to 3.1.8) quietly with feedback from external clients. We will notify all registered users on the web site of significant releases.

 

 

 

What's new in ReportLab 3.2

released on 2 June 2015

 

Changes to commercial package (rlextra/ReportLab PLUS)

  • Added a new attribute bulletAnchor for Para (and some other elements), as demonstrated below:
    (for further examples see RML sample 
    test_002_paras)

  •  Fix to for setting the background color in spans. For example, in this instance there is a heading that we want to set the backgound color but do not want it to extend to the full length of the frame, so  we set backcolor for span.

  • Improvements to includePdfPages.
    • New functionaility & new attributes cropping, pageSize and mediaBoxType.
      (for further examples, see RML sample test_016_pagecatcher)
    • Prior to this release, if you read a number of PDF files with includePdfPages and the function failed, it was not always clear which file was causing the problem. Error messages are now generated to name the file in which the exception occured. eg:
     IOError: (u'Cannot open resource "no-such-file.pdf"', "error storing u'no-such-file.pdf' in memory")
  • Changes to make the creation of long documents more straightforward.
    • added a name attribute for nextPage 
    • added new tags switchTemplate & nextPageIfNotEmpty.
    • (for further examples, see RML sample test_008_tables)
  • Changes to Figure and imageFigure elements, including adding captionAlign & captionPosition attributes.
Example: imageFigure with captionAlign="left"  Example: imageFigure with a para, captionPosition="top"
imageFigure_caption for rel notes 32 imageFigure_para for rel notes 32
  • Added new graphicsMode tag to insert graphics into a story.
  • Added attributes charSpace & support for mode in various string operations.
  • Add name attribute for nextPage and also new tags switchTemplate & nextPageIfNotEmpty
  • added MyExpandingText pluginFlowable which adjusts the font size to the maximun for the given space. See examples, RML sample test_008_tables)

Changes to open source code (reportlab)

  • Almost all of the above new features have the corresponding objects and attributes within our class hierarchy and may be used in the open source code. The exception is includePdfPages which is a commercial-only feature.   
  • Added proportional underlining specific to font sizes, set via the underlineProportion attribute of ParagraphStyles. Note how the thickness of the underlining in the left column increases in relation to the increase in font size:

    Proportional underlining set   Proportional underlining not set
     
  • TrueType fonts: added support for cmaps 10 & 13:
  • Allow the character spacing to be set for canvas.drawString and similar
  • DocTemplate class now supports a boolean displayDocTitle argument.
  • TableofContents now supports a formatter argument to allow formatting of the displayed page numbers (eg for appendices etc).
  • A number of other fixes. See the ReportLab Bitbucket repository for further details.

 

Note on version numbers

We follow Python's scheme with 3-point release numbers signifying major-minor-patch.  Generally, new features will result in an announced minor release such as "3.1" or "3.2".  In the last two months our focus has been on how well the packages install, so we went through a number of releases (3.1.1 up to 3.1.8) quietly with feedback from external clients. We will notify all registered users on the web site of significant releases.

 

What's new in ReportLab 3.3

released on 2 February 2017

ReportLab Plus RML 3.2.0 --> 3.3.0 changes

1) The <pageInfo>, <template> , <pageTemplate> and <canvasInfo> tags allow the specification
of PDF parameters
    cropBox
    artBox
    trimBox
    bleedBox

which can be a pair of lengths (eg "(2, 1)" or "2,1") or none.

The <canvasInfo> tag is new and also allows specification of initial initialFontName, initialFontSize & initialLeading values to be used directly by the canvas.

2) <letterBoxes> tag now has boolean (default true) attributes

    strokeTop
    strokeBottom
    strokeLeft
    strokeRight

that (together with stroke) determine if the relevant box sides should be stroked.

3) <paraStyles> & <para> tags allow specification of justifyBreaks and justifyLastLine.

4) The <setTopFlowables> tag may be used to set flowables to appear at the top of
every frame. If the tag's show attribute is true it will also appear when setTopFlowables is used.
See test_025_set_top_flowables.rml at https://bitbucket.org/rptlab/rlextra-examples.

5) The <sup>/<super> and <sub> tags now take optional rise and size attributes which control size and position of superscript & subscript text.

 

Note on version numbers

We follow Python's scheme with 3-point release numbers signifying major-minor-patch.  Generally, new features will result in an announced minor release such as "3.1" or "3.2".

 

What's new in ReportLab 3.4

released on 7th March 2017

Changes to commercial package (rlextra/ReportLab PLUS)


1) We now support SVG as a format for embedded vector graphics. Refer to samples https://www.reportlab.com/examples/rml/test/test_002_paras_index.rml & https://www.reportlab.com/examples/rml/test/test_002_paras_index.pdf

In order to do this, a number of subtle changes and options to the rendering model were needed:

The <path> tag may now contain a <closePath/> tag to indicate that this is a closed path. The last point will be joined to the start.

The <path> tag has extra attributes
attribute fillRule (none | even-odd | non-zero)

none means use whatever is current default; even-odd means even odd crossing
determines the filling of the path, non-zero means that the crossing number
should be non-zero.

Attribute autoClose (none | pdf | svg) for filled  non closed subpaths use
different methods of filling the subpath. The svg mechanism measn effectively
stroking and drawing separately.

For examples see the end of test_050_paths.rml at https://www.reportlab.com/examples/rml/test/test_050_paths.rml

The image type attribute may now be "svg" to allow svg drawings to be used.

 

2)  The <barCodeFlowable> and <barCode> tags now support these encodings
                Codabar
                Code11
                Code128
                EAN13
                EAN5 (new)
                EAN8
                ECC200DataMatrix (new)
                Extended39
                Extended93
                FIM
                I2of5
                ISBN
                MSI
                POSTNET
                QR
                Standard39
                Standard93
                UPCA (new)
                USPS_4State

3) We have considerably expanded our support for fillable forms within PDF files. The <textField> tag has many more attributes<checkboxField>, <radioField>, <choiceField> & <listboxField> which
along with the new <textField> make possible PDF forms. See example in test_028_fields.rml at https://www.reportlab.com/examples/rml/test/test_028_fields.rml




4) The <ul> & <ol> tags now support automatic style change for the start/type parameter, by using a space separated list fo start values. See for https://www.reportlab.com/examples/rml/test/test_046_lists.rml

<ul> example

<ol> example

 

  • added support for rotating bullets in ul/ol; version-->3.3.33
  • add relative value <sup>/<sub> examples; version-->3.3.1

Changes to Open Source package (reportlab)

Also contains some commercial package (rlextra/ReportLab PLUS) fixes.

* More pagesizes from https://en.wikipedia.org/wiki/Paper_size (contributed by https://bitbucket.org/alainchiasson/)
* add in fillMode (fill-rule) variable to the graphics state for drawings
* add support for automatic bullet rotation in ListFlowables.
* fix acroform annotation bug in radios (reported by Olivia Zhang)
* fix split paragraph rendering bug (reported by Olivia Zhang & Echo Bell)
* Allow Image to have a drawing as argument
* support for Path autoclose & fillMode; version --> 3.3.29
* add support for different fill policies in renderXX drawPath; version-->3.3.28
* allow for UTF_16_LE BOM, fix for bug contributed by Michael Poindexter mpoindexter@housecanary.com
* improved support for images in renderPM/renderSVG bug report from Claude Paroz
* add AcroForm support to canvas; version --> 3.3.22
* avoid cr lf line endings
* attempt to ensure zipImported has some files or returns None
* added additonal test to barcode/test.py
* add an invisible font test thanks https://bitbucket.org/kb/ Konstantin Baierer
* add mailto href test
* improve UPCA barcode contribution by Kyle McFarlane https://bitbucket.org/kylemacfarlane/
* attempt to fix __loader__ issues in pyinstaller suggested by dbrnz @ bitbucket
* fix NormalDate comprisons in python3.x
* fix ypad use in ParagraphAndImage contrib annamarianfr@bitbucket, version-->3.3.16
* try to prevent multiple saving contrib by Tim Meneely
* fix problems with svg drawToString contrib by Eric Gillet & Johann Du Toit
* fix issue reported by Yitzchak Scott-Thoennes <sthoenna@gmail.com>
* fix fake KeepTogether setup in handle_keepWithNext
* add NullActionFlowable, fix empty KeepTogether
* really merge para-measure-fix
* merge para-measure-fix changes
* fixes to TypedPropertyCollection
* changes to Render class; allow drawings to specify initialFontName/Size
* fix python>=3.2 default axis labelling to match python2.x; bugfix contributed by Robin Westin bitbucket issue #82
* fix AttributeError reported by Kay Schluehr bitbucket issue #81
* add experimental time value axis
* fix bug in python shapes rendering
* add negative span style to test_platypus_tables splitting example
* fix segfault in _rl_accel.c; fix contributed by Neil Schemenauer as issue #78
* attempt to remove quadratic performance hit when longTableOptimize is set
* allow DATA: scheme in open for read
* import Table _rowpositions calculation
* support small ttfs which do not allow subsets
* add rl_settings allowTTFSubsetting
* address issue #76 (deprecated immports) reported by Richard Eames
* add table cell support for simple background shadings, contributed by Jeffrey Creem jcreem@bitbucket
* fix bug in tables.py reported by Vytis Banaitis @ bitbucket; version-->3.3.2
* minor change to allow barWidth setting in ecc200datamatrix.py (suggested by Kyle MacFarlane @ bitbucket)
* make paraparser syntax errors real and fix <sup/sub> tags to have relative values; version-->3.3.1
 

What's new in ReportLab 3.5

released on 11/July/2018

Changes to ReportlabPlus

Balanced columns example

Use the BalancedColumns class to make a flowable that splits its content flowables into two or more roughly equal sized columns. Effectively n frames are synthesized to take the content and the flowable tries to balance the content between them. The created frames will be split when the total height is too large and the split will maintain the balance.

 Attributes - ncols, needed, spaceBefore, spaceAfter, showBoundary, leftPadding, innerPadding, rightPadding, topPadding, bottomPadding

<para style="title">2 columns example</para>
<balancedColumns ncols="2">
<para style="normal"></para>
</balancedColumns>

Samples show when ncols is 2, 3, 4

More examples test_051_balancedcolumns.rml  test_051_balancedcolumns.pdf

Hyphenation functionality (with Pyphen package installed)

If the pyphen python module is installed attribute hyphenationLang controls which language will be used to hyphenate words without explicit embedded hyphens.

If embeddedHyphenation is set then attempts will be made to split words with embedded hyphens.
Attribute uriWasteReduce controls how we attempt to split long uri's. It is the fraction of a line that we regard as too much waste.

The default in module reportlab.rl_settings is 0.5 which means that we will try and split a word that looks like a uri if we would waste at least half of the line.
Currently the hyphenation and uri splitting are turned off by default.

You need to modify the default settings by using the file ~/.rl_settings or adding a module reportlab_settings.py to the python path.

Suitable values are
hyphenationLanguage='en_GB'
embeddedHyphenation=1
uriWasteReduce=0.3

<para style="normal" hyphenationLang="lt_LT">Sed pretium sollicitudin lacinia. Maecenas eget neque sit amet urna commodo vehicula. Fusce sed felis a lorem <nobr>semper</nobr> luctus. Duis congue metus eget nulla gravida placerat. Praesent arcu libero, gravida vitae commodo at, pharetra et tellus. Suspendisse pulvinar nulla nec massa convallis scelerisque in sed lacus. Donec sed orci est, sed congue neque. In hac habitasse platea dictumst.</para>

<nobr>semper</nobr> prevents hyphenation

Hypenation on long URLS, words with hyphens and words paragraphs with <span color formatting>

RML code sample here test_001_hello.rml test_001_hello.pdf

 

Other RML Fixes & Improvements
=============================
Add extra blockTable attributes emptyTableAction =(error|indicate|ignore) / minRowHeights
ParaStyle borderPadding allows tuple -  borderPadding can be a singleton or (t,r) or (t,r,b) or (t,r,b,l) ie borderPadding=(5,20,10,5)
Added <balancedColumns> see examples here test_051_balancedcolumns.rml  test_051_balancedcolumns.pdf
Added indexName attribute to getName & namedString
Added rml namedString new & discard attributes
added normalizeNameSpaces for csv data sources
Added direction to drawString methds to allow RTL
Added rml drawingGraphic tag
Added <setPageTopFlowables>
Allow for image anchorAtXY attribute
Push pageNumber into drawPdfImage
Fix unescapePDFText for python 3.x; bugf reported by Michael Trumm
svglib: <rect> as clippath definer; deferred clip-paths
Support controllable under/strike lines
Micro improvement in dumpFields.py
CanvasAdapter allow for reverse attribute translation
Fix rml endDots parameter handling
Add svg boundary control in rml
Allow for inline svg and possible converting of svg
Fix td with both row and col span

Bug fixes
---------
Fix lxml bug in svglib
Remove unwanted raise StopIteration statements (fully disallowed in 3.7)
Add pyodbc support to Datacharts; allow use of names everywhere for datasources
Fix bug in datamaker
Remove ascii, cmp & xrange builtins abuse
Reproducibility changes
Fix TT_Parse white space handling; improve reproducibility
Read file in binary mode to keep unix happy

Changes to Open Source package (reportlab)

====================================================
This is a summary of changes made to the reportlab source code for each release.
Please refer to subversion backlogs (using the release dates) for more details
or for releases which we have not provide a higher level changes list for.
E.g. to retrieve the changes made between release 3.4 and release 3.5, type::

  $ hg log -r 54ce2469ba5c

The contributors lists are in no order and apologies to those accidentally not
mentioned. If we missed you, please let us know!

RELEASE 3.5  07/07/2018
------------------------------------
* added SetPageTopFlowables flowable - This tag writes specified flowables first at the start of every page.
* BalancedColumns flowable added - This splits content into evenly balanced columns within a frame width
* primitive hyphenation functionality (with Pyphen installed) - allows hyphenation when words split
* simple paragraphs now allow space shrinkage - Redcue the whitespace between words
* mixed parallel / stacked barcharts mechanism - New chart types
* makeStream compression fix for python 3.x
* reproducibility fixes
* Bugfix for KeepWithNext and None
* Fix pie chart issue
* allow canvas filename to be a wrapped OS level file * added DocTemplate._makeCanvas
* _text2Path fix
* AcroForm improvements
* added anchorAtXY parameter for images - A
* fix PDF syntax error with no Outlines
* fix bullet code
* qrencoder fix
* table minRowHeights support
* stopped abusing builtins to aid compatibility
* fix embedded font & fontfinder bugs
* fix zero width paragraph layout error
* doughnut charts support innerRadiusFraction
* more controllable under and strike lines