[cl-pdf-devel] creating pdfs with many pages
Marc Battyani
marc.battyani at fractalconcept.com
Sun May 6 10:29:39 UTC 2007
"jeffz" <jeffz at jeffz.name> wrote:
> Hi
>
> I'm fairly new to common lisp and have just today come accross cl-pdf.
>
> I thought I'd try stripping down one of the examples and creating a
> pdf with many pages. Using cl-pdf-current.tar.gz and sbcl 1.0.5 on
> GNU/Linux, I tested as follows:
>
> (asdf:oos 'asdf:load-op :cl-pdf)
>
> (defun example4 (&optional (file #P"/tmp/ex4.pdf"))
> (pdf:with-document ()
> (loop for i from 1 to 1000
> do (pdf:with-page ()
> (pdf:with-outline-level ((format nil "Page ~d"
> i)(pdf:register-page-reference)))))
> (pdf:write-document file)))
>
> (example4)
>
> This creates the pdf successfully.
>
> $ ls -ltr /tmp/ex4.pdf
> -rw-r--r-- 1 jeffz jeffz 455424 2007-05-06 19:53 /tmp/ex4.pdf
>
> However, if I say (loop for i from 1 to 1001 ...
>
> The pdf is not created, which leaves me a bit confused.
>
> Am I doing something wrong?
Just change the *max-number-of-pages* value in config.lisp ;-)
Have fun,
Marc
More information about the cl-pdf-devel
mailing list