all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Printing from WindowXP version of emacs
Date: Thu, 5 Jan 2006 14:01:10 +0100	[thread overview]
Message-ID: <D31DA356-B8C4-449F-B656-9B9FCD9E9868@web.de> (raw)
In-Reply-To: <534d19de0601041756x783e8094v1f0397efaa7a6662@mail.gmail.com>


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 €.
>
> Thanks for the info. I wonder if the shortcoming is in the PS  
> 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  
document. ps-print.el uses ISO 8859-1, independent from the buffer  
contents' encoding. If you have a buffer contents that uses more than  
192 different characters (256 less two times 32 control characters, 7  
bit and 8 bit), you need to provide special PostScript fonts that  
encode so many characters (CID coded fonts for CJK use), or use the  
same font with different encodings to have Latin plus some extended  
Latin (a technique that's used in TeX). The final step of converting  
PS to PDF only fixes these limitations, it can't change anything  
since it's still PostScript. It's just of an improved structure  
embedding all fonts used in the document (leaving out a set of  
mandatory PS fonts) and this way giving a guarantee that this  
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  
> not a good
> solution.
> Unfortunately, while the htmlview.el printing approach is  
> 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  
> (ach, weh!)
> which can help with console mode and other platforms, such as  
> Solaris, bsd,
> etc.

I never worked on a BSD UNIX other than SunOS or Mac OS X, but I  
can't imagine that FreeBSD or NetBSD come without a (kind of third  
party) browser on their installation disks, and OpenBSD is secure  
enough that it can afford an Internet browser. They probably have  
Mozilla, Firefox, Seamonkey well integrated as a native application.  
Solaris once had HotJava (and OpenWindows) and now uses GNOME as GUI,  
so it could be viewed as a Linux variant. AIX, Irix and HP-UX will  
have some sort of Internet browser provided by the manufacturer too.  
A somehow improved version of printing a htmlize'd buffer or  
selection contents could be to use print engines in KDE or GNOME,  
which probably exist. In Mac OS X 10.2 ("Jaguar") Apple 'contributed'  
kind of a generic 'convertor' for CUPS to convert different input  
formats (JPEG, GIF, PICT, TIFF, RTF, plain text in MacRoman) to PDF  
(or PS):

	Usage: /System/Library/Printers/Libraries/convert [-f <input  
filename>] [-o <output filename>] [-i <input mimetype>] [-j <output  
mimetype>] [-P <PPD filename>] [-u] [-a <attribute string>] [-U  
<username>] [-J <jobname] [-c <copies>] [-D]

convert can optimise its PS or PDF output for the printer used via  
the PPD file, it even uses the user's system default monospaced font  
-- but only accepted plain text input is MacRoman! And it has to be a  
file -- no pipe allowed! To convert other text encodings you would  
have to use lossy iconv -c (otherwise no output at all!) to a file  
and feed this file to convert. But -- htmlize'ing first, convert now  
makes no fault with "-i text/html" and everything is printed fine!  
(Some optimisation in fonts and sizes might be fine, in a personal  
CSS file.) Using this 'Unicode encoded' HTML file all is preserved:  
the font used in Emacs, the font faces, its colours (the line breaks  
are not great yet). All that's needed is an efficient convertor from  
HTML to the printing systems native input format ... and maybe a  
button to open the system's native print dialogue!

--
Greetings

   Pete

I obviously had too much to dream last night ...

  reply	other threads:[~2006-01-05 13:01 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-04  0:34 Printing from WindowXP version of emacs BRUCE INGALLS
2006-01-04 10:00 ` Peter Dyballa
2006-01-05  1:56   ` BRUCE INGALLS
2006-01-05 13:01     ` Peter Dyballa [this message]
2006-01-05 15:41       ` Lennart Borgman
2006-01-05 21:17         ` Peter Dyballa
2006-01-06  8:39           ` Eli Zaretskii
2006-01-05 20:44       ` Eli Zaretskii
2006-01-05 21:18         ` Peter Dyballa
2006-01-06  8:36           ` Eli Zaretskii
2006-01-06 11:59             ` Peter Dyballa
2006-01-06 14:07               ` Eli Zaretskii
2006-01-10 17:37             ` PostScript printing Latin-N (with N != 1) (was: Printing from WindowXP version of emacs) Reiner Steib
2006-01-10 19:35               ` Eli Zaretskii
2006-01-11 15:55                 ` PostScript printing Latin-N (with N != 1) Reiner Steib
2006-01-11 19:59                   ` Eli Zaretskii
2006-01-12 20:35                     ` Reiner Steib
2006-01-13  8:10                       ` Eli Zaretskii
2006-01-13 17:09                         ` Reiner Steib
2006-01-11 21:55                   ` Peter Dyballa
2006-01-05 16:05     ` translation software (was: Printing from WindowXP version of emacs) Reiner Steib
  -- strict thread matches above, loose matches on Subject: below --
2006-01-10 10:19 Printing from WindowXP version of emacs LENNART BORGMAN
2006-01-09  8:29 LENNART BORGMAN
2006-01-09 11:42 ` Lennart Borgman
2006-01-10  3:13   ` BRUCE INGALLS
2006-01-08  1:06 BRUCE INGALLS
2006-01-08  4:12 ` Eli Zaretskii
2006-01-07  5:00 BRUCE INGALLS
2006-01-07  9:18 ` Eli Zaretskii
2006-01-05  9:24 LENNART BORGMAN
2006-01-05 16:43 ` Eli Zaretskii
2006-01-05 21:01   ` Lennart Borgman
2006-01-06  9:09     ` Eli Zaretskii
2006-01-04  8:45 LENNART BORGMAN
2006-01-04 18:22 ` Eli Zaretskii
2006-01-04 19:14   ` Lennart Borgman
2006-01-05  1:17 ` BRUCE INGALLS
2006-01-04  5:10 BRUCE INGALLS
2006-01-03 13:08 LENNART BORGMAN
2006-01-03 19:20 ` Eli Zaretskii
2006-01-03  0:49 BRUCE INGALLS
2006-01-03  5:10 ` Eli Zaretskii
2006-01-03  9:44 ` Peter Dyballa
     [not found] ` <mailman.21202.1136265134.20277.help-gnu-emacs@gnu.org>
2006-01-03 13:06   ` Chris McMahan
2006-01-03 19:18     ` Eli Zaretskii
2006-01-03 21:52       ` Lennart Borgman
     [not found]       ` <mailman.21297.1136325265.20277.help-gnu-emacs@gnu.org>
2006-01-03 22:08         ` David Kastrup
2006-01-03 22:12           ` Lennart Borgman
     [not found] <mailman.19907.1135077565.20277.help-gnu-emacs@gnu.org>
2005-12-20 17:15 ` Mathias Dahl
2005-12-20 10:58 LENNART BORGMAN
     [not found] <mailman.19804.1134991437.20277.help-gnu-emacs@gnu.org>
2005-12-19 16:28 ` Mathias Dahl
2005-12-19 11:18 LENNART BORGMAN
2005-12-19 21:29 ` Eli Zaretskii
2005-12-19 22:11   ` Lennart Borgman
2005-12-19 23:05     ` Eli Zaretskii
2005-12-19 23:30       ` Lennart Borgman
2005-12-20  4:30         ` Eli Zaretskii
2005-12-15 19:36 Jay Bingham
2005-12-15 15:31 sbrown
2005-12-15 18:30 ` Mathias Dahl
2005-12-15 18:35 ` Lennart Borgman
2005-12-16  7:50   ` Eli Zaretskii
2005-12-16  8:29     ` Lennart Borgman
2005-12-16  8:53       ` Eli Zaretskii
2005-12-16 14:53         ` Lennart Borgman
2005-12-16 15:31           ` Eli Zaretskii
2005-12-17  2:42             ` Lennart Borgman
2005-12-17  8:20               ` Eli Zaretskii
2005-12-17  9:38                 ` Peter Dyballa
2005-12-17 11:11                   ` Eli Zaretskii
2005-12-17 15:50                     ` Lennart Borgman
2005-12-17 16:31                       ` Peter Dyballa
2005-12-17 21:25                         ` Lennart Borgman
2005-12-17 23:55                           ` Peter Dyballa
2005-12-21 18:15                             ` Lennart Borgman
2005-12-21 21:51                               ` Eli Zaretskii
2005-12-21 22:50                                 ` Lennart Borgman
2005-12-21 23:41                                   ` Edward O'Connor
2005-12-21 23:51                                     ` Lennart Borgman
2005-12-17  9:51                 ` Lennart Borgman
2005-12-17 13:11                   ` Lennart Borgman
     [not found]               ` <mailman.19684.1134911288.20277.help-gnu-emacs@gnu.org>
2005-12-18 18:22                 ` Ilya Zakharevich
2005-12-18 19:23                   ` Eli Zaretskii
     [not found]                   ` <mailman.19772.1134933877.20277.help-gnu-emacs@gnu.org>
2005-12-19 17:53                     ` Ilya Zakharevich
2005-12-19 21:43                       ` Eli Zaretskii
     [not found]                       ` <mailman.19861.1135028638.20277.help-gnu-emacs@gnu.org>
2005-12-20  1:11                         ` Ilya Zakharevich
2005-12-20  4:54                           ` Eli Zaretskii
     [not found]                           ` <mailman.19893.1135054520.20277.help-gnu-emacs@gnu.org>
2005-12-20 22:40                             ` Ilya Zakharevich
2005-12-21  4:42                               ` Eli Zaretskii
     [not found]                               ` <mailman.20004.1135140203.20277.help-gnu-emacs@gnu.org>
2005-12-22 23:11                                 ` Ilya Zakharevich
2005-12-23  8:41                                   ` Eli Zaretskii
     [not found]                                   ` <mailman.20241.1135327583.20277.help-gnu-emacs@gnu.org>
2005-12-30  0:38                                     ` Ilya Zakharevich
2005-12-30 11:44                                       ` Eli Zaretskii
     [not found]                                       ` <mailman.20871.1135945105.20277.help-gnu-emacs@gnu.org>
2006-01-05  6:53                                         ` Ilya Zakharevich
2006-01-05 16:39                                           ` Eli Zaretskii
     [not found]                                           ` <mailman.21485.1136479302.20277.help-gnu-emacs@gnu.org>
2006-01-07 12:02                                             ` Ilya Zakharevich
2006-01-07 12:55                                               ` Eli Zaretskii
2005-12-20 14:45                         ` Peter Boettcher
2005-12-20 20:21                           ` Eli Zaretskii
2005-12-20 22:22                             ` Lennart Borgman
2005-12-21  4:34                               ` Eli Zaretskii
2005-12-21  7:49                                 ` Lennart Borgman
2005-12-21 18:39                                   ` Lennart Borgman
2005-12-21 19:33                                   ` Eli Zaretskii
2005-12-21 20:11                                     ` Lennart Borgman
2005-12-21 22:15                                       ` Eli Zaretskii
2005-12-21 22:48                                         ` Lennart Borgman
2005-12-22  4:38                                           ` Eli Zaretskii
2005-12-22  8:02                                             ` Lennart Borgman
2005-12-22 19:37                                               ` Eli Zaretskii
2005-12-22 20:46                                                 ` Lennart Borgman
2005-12-23  8:21                                                   ` Eli Zaretskii
2005-12-23 14:06                                                     ` Lennart Borgman
2005-12-23 15:20                                                       ` Eli Zaretskii
2005-12-24 13:49                                                         ` Eli Zaretskii
2005-12-24 14:39                                                           ` Eli Zaretskii
2005-12-24 14:58                                                             ` Eli Zaretskii
2005-12-16  9:26       ` Peter Dyballa
2005-12-16 10:45         ` Eli Zaretskii
2005-12-16  9:19     ` Peter Dyballa
2005-12-16 10:46       ` Eli Zaretskii
2005-12-16 14:19       ` Lennart Borgman
     [not found]   ` <mailman.19545.1134911104.20277.help-gnu-emacs@gnu.org>
2005-12-19  9:58     ` Mathias Dahl
2005-12-19 21:25       ` Eli Zaretskii
     [not found]       ` <mailman.19857.1135027571.20277.help-gnu-emacs@gnu.org>
2005-12-20  7:41         ` Mathias Dahl
2005-12-20 19:58           ` Eli Zaretskii
2005-12-20 20:59             ` Drew Adams
2005-12-15 19:36 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D31DA356-B8C4-449F-B656-9B9FCD9E9868@web.de \
    --to=peter_dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.