Saturday, October 04, 2008

PDF and Smalltalk

PDF is a very handy way to deliver documents over http and there are a number of ways to do this from within Smalltalk. A write up of several techniques can be found here:

seaside.st: PDF in Seaside

I'm one of the main authors of the SPDF library, so it's nice to see it listed among the options. SPDF was developed for use in the insurance industry where 'forms' needed to be produced on the fly, sometimes including TIFF images. SPDF did it's job well enough for the problem at hand, but it's capabilities are rather, ah, narrow.

Having said that, the library is an implementation of the PDF spec, so the terminology of the spec is reflected in the Smalltalk implementation (e.g. data structures and class & method names) ... so it should not be too hard to implement more of the spec as and when needed.

As a case in point, on a recent project I used the SPDF library to produced documents that required automatic line breaking and breaking over pages, and even using the Frame classes to have text flow from a rectangle on one page to the same rectangle on the next page - which happens to addresses some of the weaknesses of SPDF (correctly) identified in the write up.

The current version of SPDF is available from the Cincom public Store repository.

No comments: