all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Vinicius Jose Latorre <viniciusjl@ig.com.br>,
	saint@eng.it, emacs-devel@gnu.org
Subject: Re: Emacs Installer for MS Windows
Date: Thu, 26 Aug 2004 21:41:49 +0200	[thread overview]
Message-ID: <m365757kle.fsf@seneca.benny.turtle-trading.net> (raw)
In-Reply-To: <000d01c48b9c$763a5570$0200a8c0@sedrcw11488> (Lennart Borgman's message of "Thu, 26 Aug 2004 20:42:22 +0200")

Hi Lennart,


"Lennart Borgman" <lennart.borgman.073@student.lu.se> writes:
> Word (or any other program that wants to print) talks to a printer
> driver. This driver has specific information about the printer
> choosen. Whether the translation to PostScript takes place in Word
> or in the printer driver is not entirely clear to me.

In the Word/Notepad/Mozilla scenario the fact that the printer uses
PostScript is a private agreement between the printer driver and the
printer device.  The printer driver is a plugin DLL for the Windows
graphics API, the so-called "GDI".  Word (or Notepad or Mozilla) is
just calling the GDI API to print.  The GDI routes all calls from the
application to the printer driver.  The printer driver does the right
thing, it creatES PostScript, PCL, Epson escape sequences or whatever.
Than the driver gets that to the device or to an intermediate printer
queue.

> However the version of Acrobat that create the pdf document acts as
> a printer dirver and it has the capability to create a pdf document
> from any program from which you can print.

A printer driver in the above scenario can do anything it wants with
the application calls.  Adobe's PDF-driver just decides not to connect
to any hardware device, instead it asks the user for a filename.  As
this is all in DLLs (shared libraries) inside the printing foreground
process, putting up a dialog to ask for a filename is not considered a
problem.

> This makes me believe there is some kind of meta-language for
> description of the printout that is translated to PostScript by the
> printer driver.

Usually there is no intermediate format involved, just calls to the
API and from there to the driver interface.

You *can* just collect all those calls into a file and re-play that
file later, that's the format that is called a Windows metafile (WMF
or more recently EMF).  But that is an exception, not the usual case.

> Probably there then must be open source code for things like this in
> Open Office and Mozilla.

Emacs works differently at the moment.  It creates a representation
that it thinks is suitable for a printer and than it calls a program
to put this formatted document directly into a printer queue.  This
by-passes the Windows printer driver.  Emacs has two implementations
for formatting, one using line-printer style plain text (lpr.el) and
one using PostScript (ps-print.el).

This mode of operation does work where either of these formats is
supported and sufficient.  For nicer-looking results you want to use
ps-print.el, of course.  Non-PostScript printers can be made to work
on Windows in this manner by using Ghostscript as the program to call,
as was already mentioned.  Ghostscript includes a driver that uses GDI
for its work (more or less the reverse of that PDF printer driver
above).  This mode works with any Windows printer.  Of course
printer-specific Ghostscript drivers should give better results.

If you want OOTB printing for Emacs on Windows for any printer, you
need either bundle (and automatically configure) Ghostscript, or you
need to write a third printing implementation similar to ps-print.el
that uses GDI calls.  The first solution is larger, but much easier to
implement and automatically compatible with code that builds on top of
ps-print.el.  Given that disk space and bandwidth is cheap these days
and that Ghostscript is free, it may be the way to go.

This could be part of the Windows installer.  You may want to download
Ghostscript as an automated step during installation and only, when it
is not already installed.  I.e. make a customization option in the
installer to either download Ghostscript or pick an existing
installation or to do neither (that option would only be available at
"expert" level, I guess).


benny

  reply	other threads:[~2004-08-26 19:41 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-02 22:17 Emacs Installer for MS Windows Lennart Borgman
2004-08-03  4:41 ` Dhruva Krishnamurthy
2004-08-04 20:37   ` Peter 'Luna' Runestig
2004-08-04 20:55     ` David Kastrup
2004-08-05  6:51       ` Peter 'Luna' Runestig
2004-08-05  6:55         ` Peter 'Luna' Runestig
2004-08-05  7:26         ` David Kastrup
2004-08-05  8:18         ` Dhruva Krishnamurthy
2004-08-05 14:27           ` Lennart Borgman
2004-08-06  4:17             ` Dhruva Krishnamurthy
2004-08-06 13:43             ` Richard Stallman
2004-08-06 13:56               ` David Kastrup
2004-08-06 17:07                 ` Peter 'Luna' Runestig
2004-08-27 21:26                   ` Peter 'Luna' Runestig
2004-08-06 15:39               ` Frank Schmitt
2004-08-07 16:10               ` Eli Zaretskii
2004-08-23 19:21             ` Lennart Borgman
2004-08-23 19:51               ` Stefan Monnier
2004-08-24 18:13                 ` Lennart Borgman
2004-08-24 18:33                   ` Stefan Monnier
2004-08-24 19:31                     ` Lennart Borgman
2004-08-24 19:58                       ` Stefan Monnier
2004-08-25  0:06                         ` Lennart Borgman
2004-08-25  2:51                           ` Stefan
2004-08-26 18:27                             ` Lennart Borgman
2004-08-26 18:35                               ` David Kastrup
2004-08-26 21:00                                 ` Stefan Monnier
2004-08-26 21:41                                   ` Lennart Borgman
2004-08-25  4:15                           ` Eli Zaretskii
2004-08-25  7:09                             ` Peter 'Luna' Runestig
2004-08-25 16:01                               ` Lennart Borgman
2004-08-25 18:24                               ` Eli Zaretskii
2004-08-26 15:17                             ` Vinicius Jose Latorre
2004-08-26 16:09                               ` Lennart Borgman
2004-08-26 16:21                                 ` Vinicius Jose Latorre
2004-08-26 18:34                                   ` Stefan Monnier
2004-08-26 16:29                               ` Gian Uberto Lauri
2004-08-26 16:58                                 ` Lennart Borgman
2004-08-26 17:40                                   ` Vinicius Jose Latorre
2004-08-26 18:38                                     ` Stefan Monnier
2004-08-27  6:52                                       ` Gian Uberto Lauri
2004-08-26 18:42                                     ` Lennart Borgman
2004-08-26 19:41                                       ` Benjamin Riefenstahl [this message]
2004-08-26 22:17                                       ` Lennart Borgman
2004-08-27  9:22                                         ` Benjamin Riefenstahl
2004-08-27 13:20                                           ` Stefan Monnier
2004-08-27 13:38                                             ` Benjamin Riefenstahl
2004-08-27 15:08                                         ` Lennart Borgman
2004-08-27 15:24                                           ` Gian Uberto Lauri
2004-08-27 15:42                                           ` Benjamin Riefenstahl
2004-08-28  1:36                                           ` Richard Stallman
2004-08-27 15:16                                         ` Lennart Borgman
2004-08-27 15:47                                           ` David Kastrup
2004-08-28  1:36                                           ` Richard Stallman
2004-08-27 15:44                                         ` Lennart Borgman
2004-08-27 16:14                                         ` Lennart Borgman
2004-08-26 15:51                         ` Vinicius Jose Latorre
2004-08-26 16:52                           ` Lennart Borgman
2004-08-26 19:44                             ` Eli Zaretskii
2004-08-26 19:49                             ` Benjamin Riefenstahl
2004-08-23 19:59               ` David Kastrup
2004-08-24  5:37               ` Dhruva Krishnamurthy
2004-08-24 16:33                 ` Benjamin Riefenstahl
2004-08-24 21:02               ` Richard Stallman
2004-08-24 21:09                 ` David Kastrup
2004-08-25  4:06                 ` Eli Zaretskii
2004-08-25 16:21                   ` Lennart Borgman
2004-08-25 18:34                     ` Eli Zaretskii
2004-08-25  4:41                 ` Richard Stallman
2004-08-05 11:18         ` Paul Pogonyshev
2004-08-05 15:33           ` Stefan Monnier
2004-08-04 21:09     ` Stefan Monnier
2004-08-04 22:12       ` Lennart Borgman
2004-08-05  2:05       ` Stephen J. Turnbull
2004-08-05  2:40         ` David Kastrup
  -- strict thread matches above, loose matches on Subject: below --
2004-08-04 21:42 Robert Anderson
2004-08-24  7:04 Berndl, Klaus
2004-08-24 17:35 ` Steven Tamm
2004-08-24 18:08   ` David Kastrup
2004-08-24 21:20     ` Steven Tamm
2004-08-24 21:35       ` Stefan Monnier
2004-08-25  1:02         ` Steven Tamm
2004-08-25  2:38           ` Stefan
2004-08-25  4:16           ` Eli Zaretskii
2004-08-25  7:48           ` David Kastrup
2004-08-24 21:55       ` David Kastrup
2004-08-25  0:14         ` Lennart Borgman
2004-08-25  0:24           ` David Kastrup
2004-08-25  4:41     ` Richard Stallman
2004-08-25  7:56       ` David Kastrup
2004-08-25 22:40         ` Richard Stallman
2004-08-25 23:03           ` David Kastrup
2004-08-26  7:04             ` Kim F. Storm
2004-08-26  7:56               ` David Kastrup

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=m365757kle.fsf@seneca.benny.turtle-trading.net \
    --to=benjamin.riefenstahl@epost.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=saint@eng.it \
    --cc=viniciusjl@ig.com.br \
    /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.