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: Printing from WindowXP version of emacs Date: Thu, 5 Jan 2006 14:01:10 +0100 Message-ID: References: <534d19de0601031634o49dfd53dl7d701ff6512900f9@mail.gmail.com> <6FC795CC-C015-4A12-81DF-15E01A9E9EDA@Web.DE> <534d19de0601041756x783e8094v1f0397efaa7a6662@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1136475069 20950 80.91.229.2 (5 Jan 2006 15:31:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2006 15:31:09 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 05 16:31:07 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EuX4u-0006is-Io for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jan 2006 16:31:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuWwt-0002o7-N9 for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jan 2006 10:22:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuUll-0001mB-Iw for help-gnu-emacs@gnu.org; Thu, 05 Jan 2006 08:03:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuUlk-0001lR-6H for help-gnu-emacs@gnu.org; Thu, 05 Jan 2006 08:03:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuUlj-0001lD-JQ for help-gnu-emacs@gnu.org; Thu, 05 Jan 2006 08:03:03 -0500 Original-Received: from [217.72.192.225] (helo=smtp07.web.de) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EuUnJ-0008Q0-0a for help-gnu-emacs@gnu.org; Thu, 05 Jan 2006 08:04:41 -0500 Original-Received: from [87.193.29.214] (helo=[192.168.1.2]) by smtp07.web.de with asmtp (TLSv1:RC4-SHA:128) (WEB.DE 4.105 #340) id 1EuUjx-00030C-00; Thu, 05 Jan 2006 14:01:13 +0100 In-Reply-To: <534d19de0601041756x783e8094v1f0397efaa7a6662@mail.gmail.com> X-Image-Url: http://homepage.mac.com/sparifankal/.cv/thumbs/me.thumbnail Original-To: BRUCE INGALLS X-Mailer: Apple Mail (2.746.2) X-Sender: Peter_Dyballa@web.de 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:32445 Archived-At: Am 05.01.2006 um 02:56 schrieb BRUCE INGALLS: >> You are using the usual ps-print functions and then ps2pdf to convert >> PS output to PDF. This is OK for US-ASCII and ISO Latin-1/ISO 8859-1, >> but it fails already in ISO Latin-9/ISO 8859-15, ISO Latin with =80. > > Thanks for the info. I wonder if the shortcoming is in the PS =20 > generation, or > in the PDF conversion. I'm sure you could `gsview foo.ps` to find out. The problem is encoding of the PostScript fonts used to set the =20 document. ps-print.el uses ISO 8859-1, independent from the buffer =20 contents' encoding. If you have a buffer contents that uses more than =20= 192 different characters (256 less two times 32 control characters, 7 =20= bit and 8 bit), you need to provide special PostScript fonts that =20 encode so many characters (CID coded fonts for CJK use), or use the =20 same font with different encodings to have Latin plus some extended =20 Latin (a technique that's used in TeX). The final step of converting =20 PS to PDF only fixes these limitations, it can't change anything =20 since it's still PostScript. It's just of an improved structure =20 embedding all fonts used in the document (leaving out a set of =20 mandatory PS fonts) and this way giving a guarantee that this =20 document will print everywhere and exactly the same. > >> htmlize.el is a great tool, yes! >> >> For 'Carbon Emacs' on Mac OS X this seems to >> become the standard printing interface ... although some users and >> developers seem to have a 'strange' feeling when using this! And it >> does not need third party software (ps2pdf from Ghostview). > > Well, it did not take much convincing, to tell me that ps2pdf is =20 > not a good > solution. > Unfortunately, while the htmlview.el printing approach is =20 > appealing, it does > rely on 3rd party software, namely the web browser (unless you use the > lower quality w3.el, which is an optional package). > > Fortunately, w32, osx & linux/gnome have default browsers, that Emacs > can detect. I have included browser detection software in EMacro =20 > (ach, weh!) > which can help with console mode and other platforms, such as =20 > Solaris, bsd, > etc. I never worked on a BSD UNIX other than SunOS or Mac OS X, but I =20 can't imagine that FreeBSD or NetBSD come without a (kind of third =20 party) browser on their installation disks, and OpenBSD is secure =20 enough that it can afford an Internet browser. They probably have =20 Mozilla, Firefox, Seamonkey well integrated as a native application. =20 Solaris once had HotJava (and OpenWindows) and now uses GNOME as GUI, =20= so it could be viewed as a Linux variant. AIX, Irix and HP-UX will =20 have some sort of Internet browser provided by the manufacturer too. =20 A somehow improved version of printing a htmlize'd buffer or =20 selection contents could be to use print engines in KDE or GNOME, =20 which probably exist. In Mac OS X 10.2 ("Jaguar") Apple 'contributed' =20= kind of a generic 'convertor' for CUPS to convert different input =20 formats (JPEG, GIF, PICT, TIFF, RTF, plain text in MacRoman) to PDF =20 (or PS): Usage: /System/Library/Printers/Libraries/convert [-f ] [-o ] [-i ] [-j ] [-P ] [-u] [-a ] [-U =20 ] [-J ] [-D] convert can optimise its PS or PDF output for the printer used via =20 the PPD file, it even uses the user's system default monospaced font =20 -- but only accepted plain text input is MacRoman! And it has to be a =20= file -- no pipe allowed! To convert other text encodings you would =20 have to use lossy iconv -c (otherwise no output at all!) to a file =20 and feed this file to convert. But -- htmlize'ing first, convert now =20 makes no fault with "-i text/html" and everything is printed fine! =20 (Some optimisation in fonts and sizes might be fine, in a personal =20 CSS file.) Using this 'Unicode encoded' HTML file all is preserved: =20 the font used in Emacs, the font faces, its colours (the line breaks =20 are not great yet). All that's needed is an efficient convertor from =20 HTML to the printing systems native input format ... and maybe a =20 button to open the system's native print dialogue! -- Greetings Pete I obviously had too much to dream last night ...