From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: postscript printing from emacs Date: Fri, 23 Mar 2007 18:04:42 +0100 Message-ID: <8C4EA5A3-EA5C-46C2-8270-9E2A6AB4C24D@Web.DE> References: <243C6E55-C719-4B05-9290-C5C5A8472B71@Web.DE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1174669770 5698 80.91.229.12 (23 Mar 2007 17:09:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2007 17:09:30 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: stromme@math.uib.no (=?ISO-8859-1?Q?Stein_Arild_Str=F8mme?=) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 23 18:09:13 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 1HUnGL-0005kL-0F for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Mar 2007 18:09:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUnIG-0004xA-1t for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Mar 2007 12:11:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUnDz-00074M-HQ for help-gnu-emacs@gnu.org; Fri, 23 Mar 2007 13:06:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUnDx-00071n-RL for help-gnu-emacs@gnu.org; Fri, 23 Mar 2007 13:06:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUnDx-00071D-IA for help-gnu-emacs@gnu.org; Fri, 23 Mar 2007 12:06:45 -0500 Original-Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUnC1-0005y0-EW for help-gnu-emacs@gnu.org; Fri, 23 Mar 2007 13:04:45 -0400 Original-Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate02.web.de (Postfix) with ESMTP id A1FB56BB892B; Fri, 23 Mar 2007 18:04:44 +0100 (CET) Original-Received: from [62.134.225.94] (helo=[192.168.1.2]) by smtp07.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.107 #114) id 1HUnC0-0003sj-00; Fri, 23 Mar 2007 18:04:44 +0100 In-Reply-To: X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-detected-kernel: Linux 2.4-2.6 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:42141 Archived-At: Am 23.03.2007 um 16:41 schrieb Stein Arild Str=F8mme: > I also find it suspicious that Preview.app in OS X cannot display =20 > the file correctly (it does > with other postscript files). I reported this error before. Ps-print is pretty useless, in any case =20= in Mac OS X. Besides this it only supports one or two encodings: US 7-=20= bit ASCII and ISO 8859-1. =46rom the failure with Preview you can deduce that the Mac OS X and =20= CUPS related mechanisms to prepare the PS output for printing are the =20= reason that your printer reports a failure. It's nothing but non-=20 sense that gets into the printer queue. (You can halt the queue and =20 inspect what's in it!) > > So what is it about the ps-print-generated postscript files fools the > printer and Preview.app, that's the question. I presume it's like MSIE "optimised" web sites: only Ghostscript can =20 convert and only Ghostscript can display. So the function family =20 should better, before release of GNU Emacs 22.1, be renamed gs-print. =20= BTW, the PDF output gs 8.54 produces from ps-print output on my Mac =20 (Mac OS X 10.4.9) cannot be displayed in Preview, either. > > | > As alternatives, I'm exploring ways to use a2ps or enscript =20 > instead, > | > but they don't seem to support utf-8. Other ways? > | > | Use htmlize to convert the buffer or region content to UTF-8 encoded > | HTML, view it in a capable browser, print from the browser. > > That is tongue-in-cheek, surely? No. It's a proven way. And it's the only way a few members on this =20 list could find. The (Japanese) Carbon Emacs (Package) uses such a =20 conversion and then uses an adapted version of the Coral application =20 to convert HTML to PDF. You can try to use Apple's /System/Library/=20 Printers/Libraries/convert =96 it is meant to prepare or produce =20 printer queue material. Lennart Borgman has written htmlize-view.el to ease the conversion of =20= buffer or region contents to HTML, and view it in your default =20 browser. Then press Print ... The problem with PostScript is that it usually only supports 8 bit =20 encodings. So you can't print Unicode. You can try to find a CID =20 keyed PostScript font and with some effort you can print CJK. No such =20= font is available for free or public domain. TrueType and OpenType =20 fonts have better Unicode support. Modern PostScript can use such =20 TrueType fonts, which are quite often free and acceptable quality. =20 But I have no idea how to create a mapping from an UTF-8 encoded text =20= to a Unicode encoded font in PostScript. -- Greetings Pete Mac OS X is like a wigwam: no fences, no gates, but an apache inside.