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

Marc Battyani marc.battyani at fractalconcept.com
Wed Apr 28 21:30:21 UTC 2004


"Arthur Lemmens" <alemmens at xs4all.nl> wrote:
> 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.

Good! So we will be able to integrate it to cl-pdf when it is compatible.

> 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.

Yes, the pdf syntax is rather simple. It's much better to have a stand alone
parser.

> >> 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.

Heh, yet another good reason to move from TeX to cl-typesetting. ;-)
(the paper was written with TeX)

Marc





More information about the cl-pdf-devel mailing list