From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hadron Newsgroups: gmane.emacs.help Subject: Re: pdf or ps from emacs syntax highlighted source code Date: Thu, 03 May 2007 12:13:08 +0200 Message-ID: <87mz0mw6yz.fsf@gmail.com> References: <4639234F.4090405@xs4all.nl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1178188529 26195 80.91.229.12 (3 May 2007 10:35:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 May 2007 10:35:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 03 12:35:24 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HjYeh-0004hJ-HU for geh-help-gnu-emacs@m.gmane.org; Thu, 03 May 2007 12:35:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HjYlC-0006o5-W6 for geh-help-gnu-emacs@m.gmane.org; Thu, 03 May 2007 06:42:07 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-X-Trace: individual.net ZR/CAXMqEN1WKFdAzpQcpwho/ohzL1rAat7BupXp1nd4goilIg X-Orig-Path: news.individual.net!news X-Face: 2h#||Cd#d%F*NCm59[_6/{1a@jy%; |j>{D~4^gKg(^i%7j0IK?+,/GmW&:CD5fEKb_! User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.99 (gnu/linux) Cancel-Lock: sha1:ddfvmKEWFse1YTHZnEEQVqUG9SM= Original-Xref: shelby.stanford.edu gnu.emacs.help:147988 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:43586 Archived-At: Eli Zaretskii writes: >> Date: Thu, 03 May 2007 01:48:31 +0200 >> From: Bauke Jan Douma >> >> Does anyone know if and how I can create a pdf or postscript file from >> source code I'm editing in emacs, which I have syntax highlighted in >> emacs, and which syntax-highlighting (except for the background color, >> which in my case is almost black) I would like to preserve in the >> created pdf/ps file? > > "M-x ps-print-buffer-with-faces" will produce PostScript, and will > write it to a file if you invoke it with an argument. > >> Or is their any other tool that might be able to do something like >> this? The source code is C, but it would be nice to have it for php, >> (bourne) shell, etc. > > ps-print-buffer-with-faces works for any buffer. > That is so, very, very, cool. Emacs never ceases to amaze me. Can anyone suggest a good varied color "color-theme" for C code that is then readable when it is printed onto white paper?