[cl-typesetting-devel] Drawing multiple pages woes.
Erik Enge
erik at nittin.net
Tue May 11 20:16:37 UTC 2004
On May 11, 2004, at 3:20 PM, Marc Battyani wrote:
> This is the same as the one in the repository.
Ok. I installed it. Upgraded cl-pdf and installed iterate. No
difference,
(loop while (boxes content) do (draw-page content)) still just runs and
runs
with no end in sight.
Will I need to change my code to use the code that renders tables
across pages?
I tried messing a bit with the cl-typesetting-current/test.lisp file.
I changed
the multi-page-hello example to include a table:
(defun multi-page-hello (&optional (file #P"/tmp/hello.pdf"))
(pdf:with-document ()
(let ((content
(compile-text ()
(vspace 100)
(table (:col-widths '(100 200)) ;;; start Erik changes
(dotimes (time 35)
(row ()
(cell ()
(paragraph () (put-string "test")))))) ;;; end
Erik changes
(paragraph (:h-align :center :font "Helvetica-Bold" :font-size 50
:color '(0.0 0 0.8))
"cl-typesetting" :eol
(vspace 2)
(hrule :dy 1)
(with-style (:font "Times-Italic" :font-size 26)
"The cool Common Lisp typesetting system")
(vspace 50)
(with-style (:font "Times-Italic" :font-size 36 :color '(0.0 0
0.8))
(dotimes (i 100)
(put-string "Hello World!")(new-line)))))))
(loop while (boxes content) do
(pdf:with-page ()
(pdf:set-line-width 0.1)
(draw-block content 20 800 545 700))))
(pdf:write-document file)))
This one will make a PDF when run. Try changing that 35 to 36. It
will never
(well, maybe sometime, I usually give up waiting after five minutes)
create a
PDF and I have to break it. I bet 36 makes it flow over into a second
page.
Is this reproducible on your end? Is there something extra I need to
do for
Dmitri's multi-page tables to work?
Thanks for all the help,
Erik.
More information about the cl-typesetting-devel
mailing list