[cl-pdf-devel] BUG: string encoding and compression
Attila Lendvai
attila.lendvai at gmail.com
Fri Feb 23 10:59:06 UTC 2007
> I keep getting 'the variable pdf:*root-page* is unbound'. Normally, I'd
> just go with an old version of cl-pdf, but something happens with the
> compression, and I get artifact characters in front of the copyright
> symbols. This is unacceptable to our clients.
so that noone runs into this until it's fixed: if you produce a stream
longer than *min-size-for-compression* and *compress-streams* is t,
then the content of the stream is converted to '(unsigned-byte 8) by
deflate::string-to-octets (when salza is used, but other compression
methods convert to byte-array with other various fixed encodings).
the problem is that deflate::string-to-octets uses the vm's default
external format, which may be anything (it's utf-8 in my sbcl
environment) which results in utf-8 garbage in the pdf.
so, if you want to produce non-ascii pdf's then currently i suggest to
turn off compression or specify the needed encoding in
deflate::string-to-octets. unfortunately i'm missing vital PDF
knowledge on how actually encoding is implemented, so i can't give a
fix and/or a more educated advice.
hth,
--
- attila
"- The truth is that I've been too considerate, and so became
unintentionally cruel...
- I understand.
- No, you don't understand! We don't speak the same language!"
(Ingmar Bergman - Smultronstället)
More information about the cl-pdf-devel
mailing list