[cl-pdf-devel] Representation of basic PDF objects
Marc Battyani
marc.battyani at fractalconcept.com
Tue Apr 27 16:53:02 UTC 2004
"Arthur Lemmens" <alemmens at xs4all.nl> wrote:
>
> 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.
Well anyway this is not good. It should use the quoting function as there
could be some unbalanced paren in the title. I will change it. And it can't
be handled in the output for now because strings are used to represent
different things.
> 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.
Yes, PDF is nice.
Marc
More information about the cl-pdf-devel
mailing list