[Lispweb] [Announce] CL-PDF 0.45 (The Common Lisp PDF Library)

Marc Battyani marc.battyani at fractalconcept.com
Wed Feb 13 09:30:51 CST 2002


13 February 2002: Release 0.45
   Added compression for CMUCL
   Compression is now optional
   Bugs corrected (ACL compress, with-* macros, etc)
   Improved arc functions, new example 6

Marc

*****************************************
CL-PDF is a Common Lisp PDF Library for generating PDF files.

You will find it here:
www.fractalconcept.com/asp/html/cl-pdf.html

It is released with a BSD style license so it's usable for commercial work.

It it how it looks:

(pdf:with-document ()
    (pdf:with-page ()
      (let ((helvetica (make-instance 'pdf:font)))
 (pdf:add-fonts-to-page helvetica)
 (pdf:in-text-mode
  (pdf:set-font helvetica 36.0)
  (pdf:move-text 100 800)
  (pdf:draw-text "cl-pdf: Example 1"))
 (pdf:translate 230 500)
 (loop repeat 101
       for i = 0.67 then (* i 1.045)
       do (pdf:in-text-mode
    (pdf:set-font helvetica i)
    (pdf:move-text (* i 3) 0)
    (pdf:draw-text "rotation"))
       (pdf:rotate 18))))
    (pdf:write-document file))

=> gives this > http://www.fractalconcept.com/fcweb/download/ex1.pdf

Before writing it, I was rather impressed by the size of the PDF
documentation. After writing it I'm really impressed by Common Lisp. As you
will see, the library is quite small, yet really powerful.

So enjoy it and send me some great looking PDF files to put in a gallery on
the web site.

I also think that it's an opportunity to open several sub projects.

1) Finishing CL-PDF: Adding outlines,

2) Building utility layers on top of CL-PDF to turn it as a really powerful
drawing publication platform. I'm willing to coordinate and drive this
effort but I haven't the time to do it alone.

2.1-Basic Graphic primitives build on top of PDF : (Arc functions are
already done)

2.2- Higher level Graphic functions. ie Functions to draw : axis, lin/log
scales, barcodes etc.

2.3-Text layout functions (well not a full Tex but at least writing text in
a box for instance)

2.4-CL-TeX: Well here I'm kidding but not completely ;-)

3) CL-PDF Logo like layer for kids. I have teach Logo at a local school
where my sons go but I've found that Logo was great to start but a deceptive
one after a while. A CL-PDF Logo could lead to extremely good quality
drawings. I definitively think that's a way to explore.

Feedback welcomed.

Marc










More information about the lispweb mailing list