Truly portable presentations from XML to PDF

What is PythonPoint?

PythonPoint is a library for creating presentation slides. It lets you create attractive and consistent presentation slides on any platform. It is a demo app built on top of the PDFgen PDF library and the PLATYPUS Page Layout library. Essentially, it converts slides in an XML format to PDF.

The idea is a simple markup languages for describing presentation slides, and other documents which run page by page.

Feature Overview

XML Markup

The idea is a simple markup languages for describing presentation slides, and other documents which run page by page.

You create slides in a text editor with a basic XML syntax looking like this:

      <frame x="160" y="72" width="600" height="468"
          leftmargin="36" rightmargin="36">
          <para style='Heading1'>
              Welcome to PythonPoint
          </para>
          <para style='BodyText'>
              ...a library for creating presentation slides.
          </para>
      </frame> 
      

Pythonpoint then converts these into slides.

Just enter "pythonpoint.py myfile.xml" from the command line to create a PDF document.

Page Layout Model

The Page Layout model comes from PLATYPUS (Page Layout and Typography Using Scripts), a key component of the Reportlab Toolkit. This covers concepts such as:

  • Reusable 'Drawable Objects'
  • Frames into which objects flow
  • Style Sheets for text, table cells, line styles etc.
  • Wrapping, page breaking an document management logic

Everything is open and extensible.

The 'Presentation Objects'

The main hierarchy...

  • PPPresentation
  • PPSection
  • PPSlide
  • PPFrame
  • Optional sections for PPAuthor, PPTitle and PPSubject

Things to flow within frames...

  • PPPara - flowing text
  • PPPreformatted (text with line breaks and tabs for code)
  • PPImage
  • PPTable (bulk formatted tabular data)
  • PPSpacer

Things to draw directly on the page...

  • PPRect
  • PPRoundRect
  • PPDrawingElement (user base class for graphics)
  • PPLine
  • PPEllipse

Reuse and Consistency

Sections

You can create a 'section' spanning some or all tags in the presentation and place graphics on this. The blue border and title in the example come from the section. This means that you can re-brand an entire presentation for a new audience in seconds.

Style Sheets

Paragraph styles are defined externally. You may specify a filename from which to load a stylesheet with the stylesheet tag.

Thus you can have different sizes and formats by switching stylesheets, or colour and black-and-white options.

Tables are driven by line and cell styles in a similar way.

Special Effects

Acrobat Reader supports tags to define page transition effects. If you are reading this on screen, you should have seen a selection of these:

  • Blinds
  • Box
  • Wipe
  • Dissolve
  • Glitter

Each has a range of options to fine-tune.

Outlines and Hyperlinks

By default, we generate an outline view in the left pane to help you navigate. Hyperlinks within documents are also possible.

As far as we know, this is the first PDF library to expose these features.

Where can I get Pythonpoint?

PythonPoint is one of the sample applications included with the Reportlab Toolkit. Download it (see related links box - right) and look in tools/pythonpoint under the reportlab directory.

 

 

Sample presentation

A PythonPoint demonstration and tutorial

read the PDF
(PDF, 269.7 KB)

 

Download PythonPoint

PythonPoint is part of the Reportlab Toolkit distribution. Look in the tools/pythonpoint directory

Download the Reportlab Toolkit