CL-PDF and CL-Typesetting

CL-PDF is a cross-platform Common Lisp library for generating PDF files. It does not depend on any third-party tools from Adobe or others. CL-Typesetting is a complete typesetting system written in Common Lisp using CL-PDF. Both projects were originated and are being maintained by Marc Battyani. The full repository is here:
http://www.fractalconcept.com:8000/public/open-source/
(It is a subversion 1.1 repository.)

Corresponding home pages are

The only purpose of this page is to contribute the above projects by several ideas and code snippets to cope with national languages that are not based on the Latin-1 character set.

First, it is hardly possible to transfer binary data to a file in non-Latin-1 external format. So I vote for opening pdf file as a binary stream, not a character stream. In my contribution code di-pdf.lisp, which is contained in di-pdf.zip, this is the choice when the pdf-binary feature is on. The benefit would be better control over char-to-byte conversion. My suggestion affects:

Second, I suggest zlib compress-string returning (vector (unsigned-byte 8)) instead of a string. My version of zlib-lw.lisp is also placed into di-pdf.zip.


di-pdf.zip(11kb)

Third, for dealing with TrueType fonts, one could use the following utility: ttf2pt1 (the Windows binary is available here). It generates the AFM file and, if needed, the PFB file.


salza.zip(23kb)
LispWorks Optimizations for SALZA

SALZA is a CL implementation of DEFLATE and ZLIB compression algorithms, which is being developed by Zachary Beane. I suggest optimizing on INT32 API introduced in LW 4.4 and restructuring source code slightly.

CL-Typesetting example with Cyrillic

I must admit I have failed referring to a TrueType font without embedding it. Here is ex-1251.zip containing all the files needed for reproducing the ex-1251.pdf (184 Kb) on LispWorks 4.3 for Windows. The document demonstrates a justified paragraph written down with the Arial Cyrillic font.

CL-PDF code for PNG images support

This is a part of the official CL-PDF distribution now.

CL-Typesetting example with multi-page content and tables

This is a part of the official CL-PDF distribution now.