Discussion:
[Lisp-cn] 谁帮忙新手,使这段sample code 可运行,顺便简述一下方法?
andrew yang
2017-03-17 12:34:07 UTC
Permalink
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
<http://www.google.com/url?q=http%3A%2F%2Fwww.fractalconcept.com%2Fasp%2FeLJo1%2FsdataQGrDty9tQwrGDM%3D%3D%2FsdataQuQhZ0XhCuWs&sa=D&sntz=1&usg=AFQjCNFFleonrSh6zbkr_ssmQ0Hv42WIAg>

https://github.com/mbattyani/cl-pdf
3,i <https://github.com/mbattyani/cl-pdf3,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)
--
--
Lisp-cn(Lisp䞭文甚户组)
CLUG http://lisp.org.cn

---
悚收到歀邮件是因䞺悚订阅了 Google 眑䞊论坛的“Lisp-cn(Lisp䞭文甚户组)”矀组。
芁退订歀矀组并停止接收歀矀组的电子邮件请发送电子邮件到lisp-cn+***@googlegroups.com。
芁查看曎倚选项请访问 https://groups.google.com/d/optout。
andrew yang
2017-03-18 01:54:43 UTC
Permalink
已解决銖先圚repl䞭执行(ql:quickload "cl-pdf"),
然后执行load "文件名"
就生成了瀺䟋文档PDF栌匏
原来是䞍懂Emacs,䞭劂䜕运䜜LISP.

圚 2017幎3月17日星期五 UTC+8䞋午8:34:08andrew yang写道
Post by andrew yang
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
<http://www.google.com/url?q=http%3A%2F%2Fwww.fractalconcept.com%2Fasp%2FeLJo1%2FsdataQGrDty9tQwrGDM%3D%3D%2FsdataQuQhZ0XhCuWs&sa=D&sntz=1&usg=AFQjCNFFleonrSh6zbkr_ssmQ0Hv42WIAg>
https://github.com/mbattyani/cl-pdf
3,i <https://github.com/mbattyani/cl-pdf3,i> dont know how to run the
(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)
--
--
Lisp-cn(Lisp䞭文甚户组)
CLUG http://lisp.org.cn

---
悚收到歀邮件是因䞺悚订阅了 Google 眑䞊论坛的“Lisp-cn(Lisp䞭文甚户组)”矀组。
芁退订歀矀组并停止接收歀矀组的电子邮件请发送电子邮件到lisp-cn+***@googlegroups.com。
芁查看曎倚选项请访问 https://groups.google.com/d/optout。
Loading...