What's New in ReportLab PLUS 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