a3aan.st

Search

Commands

Navigation

Nationaal Spaarfonds together with the folks at Soops has just released a wrapper api for PDFlib.

PDFlib is a powerful (but not free) library for generating PDF documents. It has the ability to create regular PDF files (obviously) and you can also use (a stream on) in memory byte codes representing the document. Another thing it can do is reading an existing PDF file and add content to it (PDI). We decided to write a Smalltalk api to PDFlib and want to donate the outcome to the community under the MIT License.

The api consists of two parts.

  • A dll that wraps the dll that comes with PDFlib. This wrapper dll catches (error) return codes from calls to PDFlib.dll that result in exiting the VM otherwise. This wrapper is written in C. The source code is generated using VisualWorks.
  • A VA Smalltalk api to the wrapper. (Porting to other Smalltalk dialects is encouraged.)

Currently there are no tests, but there are a handful examples. These pretty much verify you have a working installation. Once you have set the search path in #initializeSearchPath you can run the examples using:

SpsPdfExamples new all

The wrapper api has been tested with VA Smalltalk versions 7.5.0/7.5.2 and PDFlib versions 7.0.2/7.0.3 on Windows XP 32bit (SP3).

You can download the full package including some documentation from Sourceforge.

Posted by Adriaan van Os at 16 October 2008, 9:47 pm with tags VASt, pdf, Smalltalk link

Thanks for making this available. See also http://seaside.st/documentation/pdfs for other Smalltalk PDF binding alternatives

Posted by Torsten at 17 October 2008, 8:32 am link

A small correction: the wrapper dll is written in plain C, not C++.

Posted by Reinout Heeck at 17 October 2008, 11:45 am link

Corrected.

Posted by Adriaan van Os at 17 October 2008, 4:32 pm link
© 2004-2017 Adriaan van Os  -  [ | ] Powered by Smalltalk (Squeak/Seaside/Magritte/Pier)  -  Served by Apache  -  Hosted on eComStation