cl-pdf-patches.lisp 709 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
;;; cl-pdf copyright 2002-2005 Marc Battyani see license.txt for the details
;;; You can reach me at marc.battyani@fractalconcept.com or marc@battyani.net
;;; The homepage of cl-pdf is here: http://www.fractalconcept.com/asp/html/cl-pdf.html

(in-package :pdf)


(defmacro with-page ((&rest args) &body body)
  `(let* ((*page* (make-instance 'page ,@args)))
     (with-standard-io-syntax
       ;;
       ;; FLAG -- DJC set *read-default-float-format* to be compatible with GDL's default.
       ;;
       (let ((*read-default-float-format* 'double-float))
         (setf (content (content-stream *page*))
           (with-output-to-string (*page-stream*)
             ,@body))))
     t))