From levente.meszaros at gmail.com Tue Oct 9 08:05:33 2007 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Tue, 9 Oct 2007 10:05:33 +0200 Subject: [cl-pdf-devel] Unicode issue In-Reply-To: References: Message-ID: Hi, May I ask some help? I have attached an example which results in a wrong pdf (see image). Both evince and acroread under feisty ubuntu displays wrong characters (i.e. boxes). AFAICT the problem is related to unicode encoding, escaping in pdf (for parenthesis) and external formats. I'm using SBCL and the latest cl-pdf, cl-typesetting versions. The example uses a unicode font and simply puts a string into the output document which contains #\Space #\( #\) and a few other characters. Both parenthesis and space are needed to produce the wrong pdf. If you don't have the font you may download it from: http://files-upload.com/files/548738/FreeSerif.tar And if you wish to download the resulting pdf go to: http://files-upload.com/files/548742/hello.pdf Sorry about the 30 seconds... Cheers, levy -- There's no perfectoin -------------- next part -------------- A non-text attachment was scrubbed... Name: test.lisp Type: application/x-extension-lisp Size: 578 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.png Type: image/png Size: 24871 bytes Desc: not available URL: From marc.battyani at fractalconcept.com Wed Oct 10 22:07:44 2007 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 11 Oct 2007 00:07:44 +0200 Subject: [cl-pdf-devel] Unicode issue In-Reply-To: References: Message-ID: <470D4D30.9090907@fractalconcept.com> Levente M?sz?ros wrote: > Hi, > > May I ask some help? > > I have attached an example which results in a wrong pdf (see image). Both evince > and acroread under feisty ubuntu displays wrong characters (i.e. > boxes). > > AFAICT the problem is related to unicode encoding, escaping in pdf > (for parenthesis) and external formats. I'm using SBCL and the latest > cl-pdf, cl-typesetting versions. > > The example uses a unicode font and simply puts a string into the > output document which contains #\Space #\( #\) and a few other > characters. Both parenthesis and space are needed to produce the wrong > pdf. > > If you don't have the font you may download it from: > http://files-upload.com/files/548738/FreeSerif.tar > > And if you wish to download the resulting pdf go to: > http://files-upload.com/files/548742/hello.pdf > > Sorry about the 30 seconds... > Unfortunately, the unicode integration is still in an alpha state as I've never found the time to continue it :( I will look at your example to see if I can make a fix for it. Cheers, Marc From levente.meszaros at gmail.com Thu Oct 11 08:15:07 2007 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Thu, 11 Oct 2007 10:15:07 +0200 Subject: [cl-pdf-devel] Unicode issue In-Reply-To: <470D4D30.9090907@fractalconcept.com> References: <470D4D30.9090907@fractalconcept.com> Message-ID: Hi Marc, We have looked at this issue more deeply and got to the point: (defmethod write-to-page ((string string) (encoding unicode-encoding) &optional escape) (declare (ignore escape)) (loop for char across string for code = (char-code char) do (write-char (code-char (ldb (byte 8 8) code)) *page-stream*) (write-char (code-char (ldb (byte 8 0) code)) *page-stream*))) This method does not seem to handle escaping unbalanced parenthesis. I have tried several ways to fix this. Escaping parenthesis by a backslash either in unicode or latin-1, etc but without success. I was looking at the resulting pdf in binary form and saw that the string is split into two parts separated by a horizontal spacing. This causes the unbalanced parenthesis to be present in both parts and thus displaying those boxes. Unfortunately I don't know much about pdf format. I had a look at the horrible thousand pages spec, but was unable to find out how to solve this. A workaround for this problem is to switch to a non-unicode font when displaying a parenthesis, because cl-pdf will write them in separate text chunk wihtout unicode encoding and with proper escaping. This is not so nice but works. levy -- There's no perfectoin From gwking at metabang.com Sat Oct 13 01:42:26 2007 From: gwking at metabang.com (Gary King) Date: Fri, 12 Oct 2007 21:42:26 -0400 Subject: [cl-pdf-devel] Paragraph In-Reply-To: <470D4D30.9090907@fractalconcept.com> References: <470D4D30.9090907@fractalconcept.com> Message-ID: <8530AC94-F95D-45A4-98E6-838874CB5950@metabang.com> The paragraph macro doesn't evaluate its arguments which seems to make it hard to use programatically. I've hardly scratched the surface of CL-PDF and CL-Typesetting but the following change would allow the paragraph macro to take either a property list (unevaluated) or a symbol (evaluated) as argument. (Another, perhaps better, alternative would be to have two macros -- paragraph and paragraph*? -- one of which didn't evaluate its arguments and one of which did... Am I missing something? Is there another way to modify the styles "programmatically". thanks, (defmacro paragraph ((&rest style) &body body) (print (list :x style (and (null (rest style)) (symbolp (first style))))) (with-gensyms (gstyle new-style restore-style first-indent top-margin bottom-margin first-line-indent) `(let* ((,gstyle ,@(if (and (null (rest style)) (symbolp (first style))) style `(', at style))) (,top-margin (getf ,gstyle :top-margin 0)) (,bottom-margin (getf ,gstyle :bottom-margin 0)) (,first-line-indent (getf ,gstyle :first-line-indent 0)) (,new-style (apply #'make-instance 'text-style ,gstyle)) (,restore-style (make-restore-style ,new-style)) (,first-indent ,first-line-indent)) (add-box ,new-style) (use-style ,new-style) (add-box (make-instance 'v-spacing :dy ,top-margin)) (unless (zerop ,first-indent) (add-box (make-instance 'h-spacing :dx ,first-indent))) ,@(mapcar 'insert-stuff body) (unless (eq (first (boxes-tail *content*)) :eol) (add-box :eol)) (add-box (make-instance 'v-spacing :dy ,bottom-margin)) (add-box ,restore-style) (use-style ,restore-style)))) -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM From marc.battyani at fractalconcept.com Sun Oct 14 15:52:15 2007 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 14 Oct 2007 17:52:15 +0200 Subject: [cl-typesetting-devel] Re: [cl-pdf-devel] Unicode issue In-Reply-To: References: <470D4D30.9090907@fractalconcept.com> Message-ID: <47123B2F.5050403@fractalconcept.com> Levente M?sz?ros wrote: > Hi Marc, > > We have looked at this issue more deeply and got to the point: > > (defmethod write-to-page ((string string) (encoding unicode-encoding) > &optional escape) > (declare (ignore escape)) > (loop for char across string > for code = (char-code char) > do (write-char (code-char (ldb (byte 8 8) code)) *page-stream*) > (write-char (code-char (ldb (byte 8 0) code)) *page-stream*))) > > This method does not seem to handle escaping unbalanced parenthesis. I > have tried several ways to fix this. Escaping parenthesis by a > backslash either in unicode or latin-1, etc but without success. I was > looking at the resulting pdf in binary form and saw that the string is > split into two parts separated by a horizontal spacing. This causes > the unbalanced parenthesis to be present in both parts and thus > displaying those boxes. > > Unfortunately I don't know much about pdf format. I had a look at the > horrible thousand pages spec, but was unable to find out how to solve > this. > > A workaround for this problem is to switch to a non-unicode font when > displaying a parenthesis, because cl-pdf will write them in separate > text chunk wihtout unicode encoding and with proper escaping. This is > not so nice but works. > OK BTW, sorry for the long delay for the reply. :( This function uses the normal string representation which is not very suitable for unicode strings. The hexadecimal string encodings is more bullet proof for this. So I modified cl-pdf so to use that hexadecimal encoding for unicode fonts. Seems to work for me now. Can you test it? BTW it's probably possible to use the normal string encoding with unicode fonts, it's just that the escape sequence is probably needed for the stream octets rather than the string characters. Maybe somebody has some time to look at this. Marc From levente.meszaros at gmail.com Mon Oct 15 10:03:24 2007 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Mon, 15 Oct 2007 12:03:24 +0200 Subject: [cl-typesetting-devel] Re: [cl-pdf-devel] Unicode issue In-Reply-To: <47123B2F.5050403@fractalconcept.com> References: <470D4D30.9090907@fractalconcept.com> <47123B2F.5050403@fractalconcept.com> Message-ID: > Seems to work for me now. Can you test it? Works fine here, nice to hear from you Marc. > BTW it's probably possible to use the normal string encoding with > unicode fonts, it's just that the escape sequence is probably needed for > the stream octets rather than the string characters. Maybe somebody has > some time to look at this. I did take a look at but could not figure out. It would result in smaller pdfs, so it's worth doing but not a priority for us now. As a side effect now we can turn on compression for unicode pdf-s too, since it's not going to mix up encoding anymore. Thanks again, levy -- There's no perfectoin From jeffrey.k.cunningham at boeing.com Tue Oct 16 20:31:24 2007 From: jeffrey.k.cunningham at boeing.com (Cunningham, Jeff) Date: Tue, 16 Oct 2007 13:31:24 -0700 Subject: [cl-pdf-devel] [Fwd: Re: cl-pdf question] Message-ID: <47151F9C.80101@boeing.com> I am posting this question to the list at Marc's suggestion. If anyone knows how to configure cl-pdf to run under SBCL I'd sure appreciate some advice. Thanks. --Jeff Hi Jeff, Cunningham, Jeff wrote: > Hi Marc, > > I'm no doubt doing something really dumb, but I can't get your first > example to work in cl-pdf. > I am working with the latest copy and have all the dependencies > (latest copies). I'm running SBCL. I'm hoping you can tell me how to > get past this. > > Thanks. > --Jeff Cunningham > Seattle, Washington, USA > > Here's what I get: > > (asdf:oos 'asdf:load-op :cl-pdf) > (use-package :pdf) > > ;;; cl-pdf copyright 2002-2005 Marc Battyani see license.txt for > details of the BSD style license > ;;; You can reach me at marc.battyani at fractalconcept.com or > marc at battyani.net > ;;; The homepage of cl-pdf is here: > http://www.fractalconcept.com/asp/html/cl-pdf.html > > (defun example1 (&optional (file #P"/tmp/ex1.pdf")) > (pdf:with-document () > (pdf:with-page () > (pdf:with-outline-level ("Example" (pdf:register-page-reference)) > (let ((helvetica (pdf:get-font "Helvetica"))) > (pdf:in-text-mode > (pdf:set-font helvetica 36.0) > (pdf:move-text 100 800) > (pdf:draw-text "cl-pdf: Example 1")) > (pdf:translate 230 500) > (loop repeat 150 > for i = 0.67 then (* i 1.045) > do (pdf:in-text-mode > (pdf:set-font helvetica i) > (pdf:set-rgb-fill (/ (random 255) 255.0)(/ (random 255) > 255.0)(/ (random 255) 255.0)) > (pdf:move-text (* i 3) 0) > (pdf:show-text "cl-typesetting")) > (pdf:rotate 13))))) > (pdf:write-document file))) > > (example1) > > # is not a binary > output stream. > [Condition of type SIMPLE-TYPE-ERROR] > > Restarts: > 0: [ABORT] Abort SLIME compilation. > 1: [ABORT] Return to SLIME's top level. > 2: [TERMINATE-THREAD] Terminate this thread (# {B7055F1}>) > It's a configuration problem to use binary/text or bivalent streams in SBCL. I don't use SBCL, so I can't help you much here, but several cl-pdf/cl-typesetting users use it. So you should post your question in the cl-pdf mailing list. Marc -------------- next part -------------- An HTML attachment was scrubbed... URL: From ch-lisp at bobobeach.com Tue Oct 16 20:50:55 2007 From: ch-lisp at bobobeach.com (Cyrus Harmon) Date: Tue, 16 Oct 2007 13:50:55 -0700 Subject: [cl-pdf-devel] [Fwd: Re: cl-pdf question] In-Reply-To: <47151F9C.80101@boeing.com> References: <47151F9C.80101@boeing.com> Message-ID: <608097E7-73ED-4468-B9EC-4D7928959F15@bobobeach.com> Can you give some more details about your SBCL setup? What version, what platform, etc...? Thanks, Cyrus On Oct 16, 2007, at 1:31 PM, Cunningham, Jeff wrote: > I am posting this question to the list at Marc's suggestion. > If anyone knows how to configure cl-pdf to run under SBCL I'd sure > appreciate some advice. > > Thanks. > --Jeff > > > Hi Jeff, > > Cunningham, Jeff wrote: >> Hi Marc, >> >> I'm no doubt doing something really dumb, but I can't get your first >> example to work in cl-pdf. >> I am working with the latest copy and have all the dependencies >> (latest copies). I'm running SBCL. I'm hoping you can tell me how to >> get past this. >> >> Thanks. >> --Jeff Cunningham >> Seattle, Washington, USA >> >> Here's what I get: >> >> (asdf:oos 'asdf:load-op :cl-pdf) >> (use-package :pdf) >> >> ;;; cl-pdf copyright 2002-2005 Marc Battyani see license.txt for >> details of the BSD style license >> ;;; You can reach me at marc.battyani at fractalconcept.com or >> marc at battyani.net >> ;;; The homepage of cl-pdf is here: >> http://www.fractalconcept.com/asp/html/cl-pdf.html >> >> (defun example1 (&optional (file #P"/tmp/ex1.pdf")) >> (pdf:with-document () >> (pdf:with-page () >> (pdf:with-outline-level ("Example" (pdf:register-page- >> reference)) >> (let ((helvetica (pdf:get-font "Helvetica"))) >> (pdf:in-text-mode >> (pdf:set-font helvetica 36.0) >> (pdf:move-text 100 800) >> (pdf:draw-text "cl-pdf: Example 1")) >> (pdf:translate 230 500) >> (loop repeat 150 >> for i = 0.67 then (* i 1.045) >> do (pdf:in-text-mode >> (pdf:set-font helvetica i) >> (pdf:set-rgb-fill (/ (random 255) 255.0)(/ (random 255) >> 255.0)(/ (random 255) 255.0)) >> (pdf:move-text (* i 3) 0) >> (pdf:show-text "cl-typesetting")) >> (pdf:rotate 13))))) >> (pdf:write-document file))) >> >> (example1) >> >> # is not a >> binary >> output stream. >> [Condition of type SIMPLE-TYPE-ERROR] >> >> Restarts: >> 0: [ABORT] Abort SLIME compilation. >> 1: [ABORT] Return to SLIME's top level. >> 2: [TERMINATE-THREAD] Terminate this thread (#> {B7055F1}>) >> > It's a configuration problem to use binary/text or bivalent streams in > SBCL. I don't use SBCL, so I can't help you much here, but several > cl-pdf/cl-typesetting users use it. So you should post your > question in > the cl-pdf mailing list. > > Marc > > _______________________________________________ > cl-pdf-devel site list > cl-pdf-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-pdf-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From attila.lendvai at gmail.com Tue Oct 16 21:44:27 2007 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Tue, 16 Oct 2007 23:44:27 +0200 Subject: [cl-pdf-devel] [Fwd: Re: cl-pdf question] In-Reply-To: <47151F9C.80101@boeing.com> References: <47151F9C.80101@boeing.com> Message-ID: > It's a configuration problem to use binary/text or bivalent streams in > SBCL. I don't use SBCL, so I can't help you much here, but several > cl-pdf/cl-typesetting users use it. So you should post your question in > the cl-pdf mailing list. open files with :element-type :default, or don't touch it. then sbcl will open bivalent stream. -- attila From ungil at mac.com Tue Oct 16 21:44:58 2007 From: ungil at mac.com (Carlos Ungil) Date: Tue, 16 Oct 2007 23:44:58 +0200 Subject: [cl-pdf-devel] [Fwd: Re: cl-pdf question] In-Reply-To: <47151F9C.80101@boeing.com> References: <47151F9C.80101@boeing.com> Message-ID: <82BD125A-3E6E-46DC-8146-E48122C0D8B1@mac.com> Hello, does it work if you comment the line (pushnew :pdf-binary *features*) in config.lisp? There are some messages in the list archives (http://common-lisp.net/ pipermail/cl-pdf-devel/) about this problem (Dec2006/Jan2007), I'm not sure how it got solved in the end, but I think that not adding :pdf-binary to the features list will help. Cheers, Carlos El Oct 16, 2007, a las 10:31 PM, Cunningham, Jeff escribi?: > I am posting this question to the list at Marc's suggestion. > If anyone knows how to configure cl-pdf to run under SBCL I'd sure > appreciate some advice. > > Thanks. > --Jeff > > > Hi Jeff, > > Cunningham, Jeff wrote: >> Hi Marc, >> >> I'm no doubt doing something really dumb, but I can't get your first >> example to work in cl-pdf. >> I am working with the latest copy and have all the dependencies >> (latest copies). I'm running SBCL. I'm hoping you can tell me how to >> get past this. >> >> Thanks. >> --Jeff Cunningham >> Seattle, Washington, USA >> >> Here's what I get: >> >> (asdf:oos 'asdf:load-op :cl-pdf) >> (use-package :pdf) >> >> ;;; cl-pdf copyright 2002-2005 Marc Battyani see license.txt for >> details of the BSD style license >> ;;; You can reach me at marc.battyani at fractalconcept.com or >> marc at battyani.net >> ;;; The homepage of cl-pdf is here: >> http://www.fractalconcept.com/asp/html/cl-pdf.html >> >> (defun example1 (&optional (file #P"/tmp/ex1.pdf")) >> (pdf:with-document () >> (pdf:with-page () >> (pdf:with-outline-level ("Example" (pdf:register-page- >> reference)) >> (let ((helvetica (pdf:get-font "Helvetica"))) >> (pdf:in-text-mode >> (pdf:set-font helvetica 36.0) >> (pdf:move-text 100 800) >> (pdf:draw-text "cl-pdf: Example 1")) >> (pdf:translate 230 500) >> (loop repeat 150 >> for i = 0.67 then (* i 1.045) >> do (pdf:in-text-mode >> (pdf:set-font helvetica i) >> (pdf:set-rgb-fill (/ (random 255) 255.0)(/ (random 255) >> 255.0)(/ (random 255) 255.0)) >> (pdf:move-text (* i 3) 0) >> (pdf:show-text "cl-typesetting")) >> (pdf:rotate 13))))) >> (pdf:write-document file))) >> >> (example1) >> >> # is not a >> binary >> output stream. >> [Condition of type SIMPLE-TYPE-ERROR] >> >> Restarts: >> 0: [ABORT] Abort SLIME compilation. >> 1: [ABORT] Return to SLIME's top level. >> 2: [TERMINATE-THREAD] Terminate this thread (#> {B7055F1}>) >> > It's a configuration problem to use binary/text or bivalent streams in > SBCL. I don't use SBCL, so I can't help you much here, but several > cl-pdf/cl-typesetting users use it. So you should post your > question in > the cl-pdf mailing list. > > Marc > > _______________________________________________ > cl-pdf-devel site list > cl-pdf-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-pdf-devel From ch-lisp at bobobeach.com Tue Oct 16 21:51:51 2007 From: ch-lisp at bobobeach.com (Cyrus Harmon) Date: Tue, 16 Oct 2007 14:51:51 -0700 Subject: [cl-pdf-devel] [Fwd: Re: cl-pdf question] In-Reply-To: <47152B88.10402@boeing.com> References: <47151F9C.80101@boeing.com> <47152B88.10402@boeing.com> Message-ID: <4FF60767-8D69-4ADD-B2B1-5B499CDCC973@bobobeach.com> One other thing that would be helpful would be a stack trace from where you're seeing the problem. Thanks, Cyrus On Oct 16, 2007, at 2:22 PM, Cunningham, Jeff wrote: > > Cyrus Harmon wrote: >> Can you give some more details about your SBCL setup? What >> version, what platform, etc...? >> >> Thanks, >> >> Cyrus >> >> On Oct 16, 2007, at 1:31 PM, Cunningham, Jeff wrote: >> >> >> I am posting this question to the list at Marc's suggestion. >> If anyone knows how to configure cl-pdf to run under SBCL I'd sure >> appreciate some advice. >> >> Thanks. >> --Jeff >> >> >> Hi Jeff, >> >> Cunningham, Jeff wrote: >> >> >> Hi Marc, >> >> I'm no doubt doing something really dumb, but I can't get your first >> example to work in cl-pdf. >> I am working with the latest copy and have all the dependencies >> (latest copies). I'm running SBCL. I'm hoping you can tell me how to >> get past this. >> >> Thanks. >> --Jeff Cunningham >> Seattle, Washington, USA >> >> Here's what I get: >> >> (asdf:oos 'asdf:load-op :cl-pdf) >> (use-package :pdf) >> >> ;;; cl-pdf copyright 2002-2005 Marc Battyani see license.txt for >> details of the BSD style license >> ;;; You can reach me at marc.battyani at fractalconcept.com or >> marc at battyani.net >> ;;; The homepage of cl-pdf is here: >> http://www.fractalconcept.com/asp/html/cl-pdf.html >> >> (defun example1 (&optional (file #P"/tmp/ex1.pdf")) >> (pdf:with-document () >> (pdf:with-page () >> (pdf:with-outline-level ("Example" (pdf:register-page- >> reference)) >> (let ((helvetica (pdf:get-font "Helvetica"))) >> (pdf:in-text-mode >> (pdf:set-font helvetica 36.0) >> (pdf:move-text 100 800) >> (pdf:draw-text "cl-pdf: Example 1")) >> (pdf:translate 230 500) >> (loop repeat 150 >> for i = 0.67 then (* i 1.045) >> do (pdf:in-text-mode >> (pdf:set-font helvetica i) >> (pdf:set-rgb-fill (/ (random 255) 255.0)(/ (random 255) >> 255.0)(/ (random 255) 255.0)) >> (pdf:move-text (* i 3) 0) >> (pdf:show-text "cl-typesetting")) >> (pdf:rotate 13))))) >> (pdf:write-document file))) >> >> (example1) >> >> # is not a >> binary >> output stream. >> [Condition of type SIMPLE-TYPE-ERROR] >> >> Restarts: >> 0: [ABORT] Abort SLIME compilation. >> 1: [ABORT] Return to SLIME's top level. >> 2: [TERMINATE-THREAD] Terminate this thread (#> {B7055F1}>) >> >> >> >> It's a configuration problem to use binary/text or bivalent >> streams in >> SBCL. I don't use SBCL, so I can't help you much here, but several >> cl-pdf/cl-typesetting users use it. So you should post your >> question in >> the cl-pdf mailing list. >> >> Marc >> >> > Hi Cyrus; > > SBCL is 1.0.8 running on a Gentoo Linux system (i386) with a 2.6.19 > kernel. The relevant parts of my .sbclrc are: > > (require :asdf) > (load #p"/usr/share/common-lisp/source/asdf/asdf") > (push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*) > (push #p"/home/jcunningham/systems/" asdf:*central-registry*) > (asdf:oos 'asdf:load-op :asdf-binary-locations) > (setf asdf:*centralize-lisp-binaries* t) > (setf asdf:*source-to-target-mappings* '((#p"/usr/lib/sbcl/" nil) > (#p"/usr/lib64/sbcl/" nil))) > > Thanks, > --Jeff > -------------- next part -------------- An HTML attachment was scrubbed... URL: From woudshoo+cl-typesetting at xs4all.nl Wed Oct 17 09:07:09 2007 From: woudshoo+cl-typesetting at xs4all.nl (Wim Oudshoorn) Date: Wed, 17 Oct 2007 11:07:09 +0200 (CEST) Subject: [cl-pdf-devel] [Fwd: Re: cl-pdf question] In-Reply-To: <47151F9C.80101@boeing.com> References: <47151F9C.80101@boeing.com> Message-ID: <18589.82.92.32.94.1192612029.squirrel@webmail.xs4all.nl> > I am posting this question to the list at Marc's suggestion. > If anyone knows how to configure cl-pdf to run under SBCL I'd sure > appreciate some advice. A while ago I wrote this to the cl-pdf mailing list. It sounds you had a problem similar to mine. Hope this helps, Wim Oudshoorn. ---------- RESEND PART BELOW ---------------------------------- For me every example in cl-typesetting failed with SBCL 1.0.2 because SBCL does by default not open streams in such a way that binary data can be written. The relevant section in the SBCL documentation is: 9.1 Bivalent Streams A bivalent stream can be used to read and write both character and (unsigned-byte 8) values. A bivalent stream is created by calling open with the argument :element-type :default. On such a stream, both binary and character data can be read and written with the usual input and output functions. I fixed it by the following patch, although, keep in mind that I just started to play with common lisp so I hesitate to suggest it to do it this way. *** cl-pdf/pdf.lisp Tue Jan 3 17:01:21 2006 --- ../asdf-source/cl-pdf/pdf.lisp Thu May 31 16:56:44 2007 *************** *** 528,535 **** (format s "~%>>~%startxref~%~d~%%%EOF~%" startxref)))) (defmethod write-document ((filename pathname) &optional (document *document*)) ! (with-open-file (s filename :direction :output :if-exists :supersede ! :external-format +external-format+) (write-document s document))) (defmethod write-document ((filename string) &optional (document *document*)) --- 528,536 ---- (format s "~%>>~%startxref~%~d~%%%EOF~%" startxref)))) (defmethod write-document ((filename pathname) &optional (document *document*)) ! (with-open-file (s filename :direction :output :if-exists :supersede ! #+sbcl :element-type #+sbcl :default ! :external-format +external-format+) (write-document s document))) (defmethod write-document ((filename string) &optional (document *document*))