[cl-pdf-devel] Representation of basic PDF objects

Arthur Lemmens alemmens at xs4all.nl
Wed Apr 28 20:44:54 UTC 2004


Marc Battyani wrote:

>> That's the good part. The bad part is that I haven't integrated this
>> in any way with CL-PDF (in fact, it works independently of CL-PDF at
>> the moment). I just copied the stuff I needed from PDF.LISP and
>> modified it where necessary.
>
> Bad!

Yes, I know. This was the fastest way to get things working.
I also felt that I didn't understand CL-PDF well enough (yet) to
change it. But I think I understand the first 5 chapters of the PDF
spec well enough now to write a parser for it ;-)

We'll get the parser integrated with CL-PDF. It'll just take some
more time. I expect that the parser is fully portable, by the way.
I think it uses nothing but standard Common Lisp (except for the
definition of +external-format+, which I copied from CL-PDF). It
doesn't depend on regular expressions or parser generators either.

>> Moreover, there's not much left from
>> your original parser ;-)

> Good, as I told you it was a rather crude hack.

One funny coincidence was that I originally used your mechanism
for keeping track of the parenthesis level when parsing a PDF string.
This worked perfectly well for the first 120 files I tested, until
it crashed on file #121. It turned out that this was a PDF file of
your talk for the ILC 2002 conference ;-) So I removed the parenthesis
level mechanism; it isn't mentioned anywhere in the spec anyway.

Arthur





More information about the cl-pdf-devel mailing list