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

Arthur Lemmens alemmens at xs4all.nl
Tue Apr 27 09:32:53 UTC 2004


Hi,

I have one more question/remark about representing PDF objects.
CL-PDF seems to represent PDF-strings by Lisp strings, but with
the PDF-delimiters (left and right parenthesis) included in the
string. I think that's quite error-prone.

I think it's more logical to strip off the PDF-delimiters on input
and just add them back on output. That way, you can just manipulate
your Lisp strings any way you like, without having to worry about
PDF's delimiters. For instance, here's a snippet of CL-PDF:

  (setf (content outline)
        (make-instance 'dictionary
          :dict-values `(,@(if parent `(("/Title" . ,(concatenate 'string "("
                                                      (title outline) ")"))

that could have been simplified if you just added the delimiters
on output.

I'd be interested in your opinion about this.

I'm starting to like the PDF specification quite a lot, by the way.
It's well-written and it seems to have a clean and flexible design.

Regards,

Arthur Lemmens





More information about the cl-pdf-devel mailing list