Library for reading and writing PDF files.
PDF files can be opened and all PDF objects are available as Smalltalk objects, which can be manipulated in any way you like. Likewise, any Smalltalk PDF object (net) can be written out as conforming PDF file.
The library implements the PDF specification (ISO standard PDF 32000-1:2008) in Cincom's VisualWorks Smalltalk in version 7.10 and up. The syntax is covered comprehensively, which means that any PDF file can be read and any PDF object can be written in a conforming way.
The library is for programmers who need full control over all details of PDFs.
The licence is MIT.
PDF objects are typically dictionaries or arrays. The object types and their attributes are well documented by the PDF Specification. The library defines many PDF objects as Smalltalk objects (and it is easy to add more PDF types).
The code is as close to the specification as possible. The names of types and attributes are directly used for the implementation when appropriate. When studying the PDF specification (a nice read in most parts!), it is easy to find the relevant implementation in the library.
The library code is annotated with the original descriptions and definitions from the specification, so that learning about PDF itself is well supported.
Included is a UI tool to inspect PDFs: the PDFExplorer.
This is version 2.0 of the library (October 2017). See the release notes for details.
Name The new name is PDFtalk. The first version was called PDF4Smalltalk. The namespace changed from
PDFtalk and the domain “pdftalk.de” provides a home with a wiki dedicated to the library: wiki.pdftalk.de.
Typing The heard of the “PDF engine” is the typing system which allows the assignment of Smalltalk classes to raw PDF objects. The new version has a redesigned type system where PDF types are properly modeled independent from the Smalltalk class hierarchy. This allows to rename classes freely (i.e. adding prefixes) without affecting PDF types. Also, boxing of some simple objects like “null” and booleans is not necessary anymore. Instead, existing classes are declared as PDF types.
PDFtalk for Gemstone The new release was triggered by a contract to port the library to Gemstone (thanks to HTS and Bob Nemec). A talk about this was held at ESUG 2017: “PDFtalk for Gemstone” (slides are here).
Gemstone Fileout A VisualWorks to Gemstone translation tool. This tool, with project specific code transformation declarations, creates a Gemstone filein. Used to create the Gemstone PDFtalkLibrary from the Values package and PDFtalk bundle.
Both new projects are open source with MIT licence.
Try the demos and examples.
To get the latest news and to participate in discussions, subscribe to the mailing list.
The PDF specification is extensive. The implementation covers the core mechanisms to read and write PDF objects in a conforming way. This is comparable to the virtual machine and core classes in Smalltalk. Many of the PDF features and possibilities are implemented by sets of PDF types and a clear definition of their structure and interplay. This compares to class libraries in Smalltalk.
PDF has many features which are more or less independent from each other. Implementing a PDF feature with the PDFtalk library means to define classes for each relevant PDF type for the feature and providing some automations or helpers for constructing the proper structures.
Some simple features are implemented by the library apart from the core mechanisms. Many others are not. For an overview see the state of the implementation. The documentation here is not comprehensive and covers only a few topics.
Brief descriptions of the releases are documented in the History of the project.