[bug-gswin] Using windows print.exe command

Ray Johnston ray.johnston at artifex.com
Mon Nov 3 09:48:50 PST 2003


Robert

Robert Mecklenburg wrote:

> I'm trying to print a pdf file to a network-accessible printer.  I
> saw the post in July by Eugen Ostrowski requesting the same feature
> but no response.

 From Windows, the simplest way is to use the "Add Printer" wizard to
add a printer connection to the network printer. The first non-trivial
dialog in this wizard asks for "Local Printer" or "Network Printer".
Select "Network Printer" and proceed through the wizard to establish
a printer on your system to the network accessible printer.

Then you can select this printer from the dialog that Ghostscript pops
up when using the mswinpr2 driver, or you can select it as the printer
when printing from Adobe Acrobat Reader.

> It occurred to me that I might use the print.exe command to print to
> a network printer if I could get Ghostscript to write the proper
> file.  When using the windows interface I specify mswinpr2 and
> "magic" happens to select the proper output format.  I'm assuming (I
> know, I know) that gs is writing some kind of magic windows format
> and that windows is performing the printer-specific translation.  If
> this assumption is true, is it possible to get gs to write this
> format to a file so I can feed it to print.exe?

If you have a "Local printer" of the same type as the network printer,
you can select the "Port" for the local printer as "FILE:" or in the
"Print" dialog that the mswinpr2 pops up, you can click on the
"Print to file" button. Then you will be prompted for a file name
where the driver will write the printer specific data.

This file can then be copied to the network printer using print.exe.
I recommend that you use Prfile32.exe to send the file to the printer.
This is an excellent program that allows copying files to local or
network printers. It can be downloaded from:

	http://www.lerup.com/printfile/

This is an excellent freeware utility that I use frequently for just
this purpose.

> If not, is there any output format I can select in gs that print.exe
> will work with when I don't know the printer type?

No. The mswinpr2 device gets a full page bitmap from Ghostscript and
sends it to Windows using GDI calls. This needs to be converted to
the specific printer format by the Windows driver.

> Any other suggestions for how to use print.exe or how to print to a
> network printer?

see above.

-- 
Ray Johnston
Director of Engineering                          Tel: (714) 484-0376
Artifex Software Inc.                            Fax: (714) 220-1022
______________________________________________________________________



More information about the bug-gswin mailing list