[cl-pdf-devel] Isolated a problem...
Jonathon McKitrick
jcm at FreeBSD-uk.eu.org
Sat Aug 26 22:16:06 UTC 2006
Here's the smallest amount of code required to reproduce the problem I am
having. I *think* it has to do with the pdf commands out of order, not nested
correctly, or a problem with state. You should see an 'A-carat' before the
copyright symbol.
Some possible clues are that if the 'xxx' text is any shorter than 17, the bug
does not occur. If the rectangular bar is not drawn, it does not occur.
Sorry for the attachment, but it's a small one.
Jonathon McKitrick
--
My other computer is your Windows box.
-------------- next part --------------
;; -*- mode: lisp; encoding: utf-8-unix -*-
(defun add-page (rpt &key title-page)
(declare (ignore rpt))
(let ((margin-left 30)
(margin-right 30)
(height 841)
(width 595)
(margin-top 50))
(pdf:with-saved-state
(pdf:set-line-width 0.4)
(pdf:set-rgb-fill 0.2 0.4 0.6)
(pdf:rectangle margin-left (- height (/ margin-top 1.1))
(- width (* margin-right 2)) 4)
(pdf:fill-path)
(pdf:set-rgb-fill 0 0 0)
(pdf:basic-rect margin-left (- height (/ margin-top 1.1) 4)
(- width (* margin-right 2)) 4)
(pdf:fill-path))
(pdf:in-text-mode
(pdf:set-font (pdf::get-font "Helvetica") 26.0)
(pdf:set-rgb-fill 0.2 0.4 0.6)
(pdf:move-text 30 (- height (/ margin-top 1.6)))
(pdf:draw-text "??"))
(when title-page
(pdf:in-text-mode
(pdf:set-font (pdf:get-font "Helvetica-Bold") 16.0)
(pdf:move-text 30 (- height (* margin-top 1.4)))
(pdf:set-rgb-fill 0 0 0)
(pdf:draw-text "xxxxxxxxxxxxxxxxx")))))
(defun test (&optional (file "test.pdf"))
(pdf:with-document ()
(pdf:with-page ()
(add-page nil :title-page t))
(pdf:write-document file)))
;(test)
More information about the cl-pdf-devel
mailing list