> > From: Peter Dyballa > Date: Tue, 3 Jan 2006 10:44:15 +0100 > Subject: Re: Printing from WindowXP version of emacs > > > That said, yet another hack is available: there already is code to > > export emacs buffers to PDF. > > Could you drop some names, please? Feel free to browse http://EMacro.sf.net/ for more of this stuff. I expect to make a new release, this month. Here is the relevant code, from e-common.el: ;;Note that ps2pdf might not be installed (defun save-current-buffer-as-pdf () "Export pretty-printed file to PDF format." (interactive) (ps-print-buffer-with-faces (concat (buffer-file-name) ".ps")) (shell-command (concat "ps2pdf " (buffer-file-name) ".ps")) (delete-file (concat (buffer-file-name) ".ps")) (message "Done")) (defvar cache-htmlize) ;shut up compiler (cache-locate-library use-cache 'cache-htmlize "htmlize" "To export as HTML, get htmlize.el from ") (when cache-htmlize (require 'htmlize)) (when (or cache-htmlize (which "ps2pdf")) (easy-menu-change file-menu "Export As" (list ["PDF" save-current-buffer-as-pdf (if (which "ps2pdf") t nil)] ;enable only if in PATH ["HTML" htmlize-buffer (if cache-htmlize t nil)]))) ;;note that cache-htmlize can be replaced by a slower call to locate-library()