[cl-pdf-devel] Greek letters?

Klaus Weidner kw at w-m-p.com
Tue Nov 30 23:19:29 UTC 2004


On Tue, Nov 30, 2004 at 04:54:17PM -0600, Klaus Weidner wrote:
> On Tue, Nov 30, 2004 at 08:14:51PM +0100, Björn Lindberg wrote:
> > Ah. I am using xpdf to view PDFs, and there it came up blank. But now
> > when I tried acroread it showed up both in your file and
> > mine. However, when I print it in the normal way it came up blank, so
> > there is something fishy going on. (Everything else I have done so far
> > using cl-pdf/typesetting, I can view with xpdf and print with no
> > problems.) This seems to be a font issue I guess.
> 
> The font got encoded as WinAnsiEncoding by default which appears to be
> invalid.
> 
> Try this:

Oops, that didn't work. This one works for acroread, xpdf, and
ghostscript:

  (pdf:with-document ()
    (pdf:with-page ()
      (let ((font (pdf:get-font "Symbol" nil)))
        (pdf:in-text-mode
          (pdf:set-font font 36.0)
          (pdf:move-text 100 800)
          (pdf:draw-text "abcdefghABCDEFGH"))))
    (pdf:write-document "foo.pdf"))

Now the encoding gets listed as "built-in" by acroread in the "properties
-> fonts" menu, as opposed to the "Windows" default encoding.

-Klaus



More information about the cl-pdf-devel mailing list