Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

about common lisp package "cl-pdf",who can help and modify the sample code.

56 views
Skip to first unread message

andrew yang

unread,
Mar 17, 2017, 8:19:28 AM3/17/17
to
1,I have install the Portacle(include emacs slime,sbcl)
2,have install cl-pdf,use (ql:quickload "cl-pdf"),
http://www.fractalconcept.com/asp/eLJo1/sdataQGrDty9tQwrGDM==/sdataQuQhZ0XhCuWs
https://github.com/mbattyani/cl-pdf
3,i dont know how to run the example code as following:

(in-package cl-pdf)
(defun main ()
(ut:hello)
(pdf:with-document ()
(pdf:with-page ()
(let ((helvetica (make-instance 'pdf:font)))
(pdf:add-fonts-to-page 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 101
for i = 0.67 then (* i 1.045)
do (pdf:in-text-mode
(pdf:set-font helvetica i)
(pdf:move-text (* i 3) 0)
(pdf:draw-text "rotation"))
(pdf:rotate 18))))
(pdf:write-document #P"ex1.pdf"))
)
(main)

tar...@google.com

unread,
Mar 17, 2017, 5:38:09 PM3/17/17
to
On Friday, March 17, 2017 at 5:19:28 AM UTC-7, andrew yang wrote:
> [Trouble running example code]

I would think you just need to paste the example code into the REPL buffer and
it should just run. The MAIN function is defined, and (main) should invoke it.

What have you tried?
What didn't work?

REPL = Read-Eval-Print-Loop. It is the main interaction with Lisp. For example if you were to type
(+ 1 3)
it should print 4

andrew yang

unread,
Mar 17, 2017, 9:52:34 PM3/17/17
to
在 2017年3月18日星期六 UTC+8上午5:38:09,tar...@google.com写道:
Thanks a lot,as your answer,I did it .these code can be run and generate "ex1.pdf",I'm poor with the emacs ,I think.
thanks again.
0 new messages