Ethereal-users: Re: [Ethereal-users] win32 printing

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 6 Dec 2001 01:36:59 -0800
On Thu, Dec 06, 2001 at 09:26:47AM -0000, Richard Urwin wrote:
> >> b) on windows send the printed report to a temporary file and then run
> the
> >> given application on that file. If the application was "notepad /p" this
> >> would have the required effect.
> > d) on Windows, use the native Windows APIs to print to a printer, rather
> >   than piping to a command
> (snip)
> >d) is probably the best solution, but it requires a significant amount
> > of work, especially for somebody not familiar with those APIs
> 
> Which means that (b) might get done

The problem is that (b) isn't what "print to command" was intended for.

It was intended for use when piping to a command that prints stuff; the
quick and dirty way to do that on UNIX, which never had a standard
printing API, is to pipe to the system's print command.

The ability to send output to a temporary file and then run a command on
the resulting file is potentially also interesting, *even on UNIX*, but
it's not the same as the current "print to command" - i.e., send output
to a pipe to the command.

So if people really want that, I'd vote for adding it as an
*alternative* to the current "print to command", and have:

	on UNIX:

		pipe to command (for printing to a printer)

		print to file

		print to temporary file and run command on it

	on Windows:

		print to file

		print to temporary file and run command on it

and eventually implement, on Windows:

		print to printer

		print to file

		print to temporary file and run command on it

and possibly, at some point, replace the UNIX "pipe to command (for
printing to a printer)" with "print to printer" - or perhaps leave that
in and *also* have "print to printer" (in case you want to pipe to grep
and send the output to a temporary file, or something such as that).

> What's involved in compiling on WinNT?

Visual C++ and "nmake".