[cl-pdf-devel] [Fwd: Re: cl-pdf question]

Cyrus Harmon ch-lisp at bobobeach.com
Tue Oct 16 21:51:51 UTC 2007


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)
>>
>>  #<SB-SYS:FD-STREAM for "file /tmp/ex1.pdf" {C463F41}> 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 (#<THREAD "worker"
>> {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: <https://mailman.common-lisp.net/pipermail/cl-pdf-devel/attachments/20071016/2682bdfe/attachment.html>


More information about the cl-pdf-devel mailing list