[cl-pdf-devel] a small patch, perhaps
Marc Battyani
marc.battyani at fractalconcept.com
Mon Oct 31 20:24:17 UTC 2005
Aleksandar Bakic wrote:
> > OK. I will do the same for write-cid-string too.
>
> BTW, I have been trying to write-document into a string instead of a file
(I
> need not save the PDf into a file), using sbcl with sb-unicode. There is a
> problem with it because a string cannot have :external-format set to an
8-bit
> type. When compression is turned on, the resulting PDF string is for some
> reason truncated (I guess, some sequences of bytes are interpreted as
Unicode
> characters; it's strange that I haven't hit an invalid one yet).
On what Lisp ?
> On the other hand, I think I've read that PDF is essentially a binary
format
> (it allows compression, and whatever is human-readable is "by chance").
How
> about using write-byte instead of write-char all over the code? There
would
> probably still be a problem with strings: I can (MAKE-STRING-OUTPUT-STREAM
> :ELEMENT-TYPE '(UNSIGNED-BYTE 8)) but GET-OUTPUT-STREAM-STRING expects a
string
> of characters... Perhaps there is way around the problem?
Dmitri is a fan of turning cl-pdf in binary mode. ;-)
I'm convinced too that it's the way to go but I fear it would break on a lot
of implementations. So why not, but this needs to have enough people to test
on all the impementations.
Anyway let's finish the Unicode stuff first. I'm working on the
unicode-encoding now.
Marc
More information about the cl-pdf-devel
mailing list