GSPRINT - Ghostscript print to Windows printer

This is test software. It almost certainly has bugs. After sufficient testing, this code will probably be added to GSview. Test versions of gsprint have an expiry date, currently 2000-09-30.

To test GSPRINT you need to be competent with obtaining and unpacking source archives, and configuring Ghostscript without the aid of any setup program.

GSPRINT uses Ghostscript to print a PostScript file to a Windows printer. Using Ghostscript alone you can print using a number of inbuilt printer drivers for specific printers (e.g. djet500, ljet4), or you can use the driver mswinpr2 which talks to the Windows printer driver. The mswinpr2 driver (which I wrote) is very slow. GSPRINT tells Ghostscript to produce a bitmap, and then sends this to the Windows printer driver in a much more efficient way than the old mswinpr2.

Usage

Typical usage would be
gsprint golfer.ps
gsprint -colour colorcir.ps
You first need to configure gsprint with a gsprint.cfg file. See the configuration section below.

Command line options are:

-help
Print usage summary
-mono
Render in monochrome as 1bit/pixel
-grey or -gray
Render in greyscale as 8bits/pixel
-colour or -color
Render in colour as 24bits/pixel
-query
Show printer setup dialog
-noquery
Don't show printer setup dialog
-printer "name"
Print to the specified printer
-noprinter
Use default printer
-ghostscript "name"
Path and filename of command line Ghostscript
-config "name"
Read options from this file, one argument per line.
-odd
Print only odd pages
-even
Print only even pages
-all
Print all pages
-from NN
First page to print is NN
-to NN
Last page to print is NN
-portrait
Portrait orientation
-landscape
Landscape orientation
-duplex
Duplex (vertical axis)
-copies NN
Print NN copies (if supported by Windows printer driver)
"filename"
The PostScript/PDF file to print
Defaults are -mono -noquery -noprinter -all
Unrecognised options are passed on to Ghostscript.
The filename to print must be the last option.

If neither -query nor -printer are used (the default), the default printer will be used. This is equivalent to -noquery and -noprinter.

-all overrides -odd, -even, -from and -to.
DSC comments are ignored.
-odd, -even, -from and -to operate by rendering every page but only sending the selected pages to the printer.
Printing one page out of a 200 page document using "-from 100 -to 100" will result in a long wait before and after the page is printed.
If using "-from 10 -odd", the first page printed will be 11.

The last occurence of -mono, -grey, -colour is used.

Page size and margins cannot be set from the command line. These are obtained from the printer driver. To change the page size, change your printer settings.

Ghostscript options that must not be used are:

  -r  
  -g  
  -sDEVICE=  
  -sOutputFile=  
  -sPAPERSIZE=
These are either used by, or interfere with gsprint.

Possible future options are:

 -twoup
 -scale NN.NNN
 -papersize A4

Configuration

Before reading any command line options, gsprint.exe attempts to read options from gsprint.cfg in the same directory as gsprint.exe. In this file you should place the most common options. For example:
   -mono
   -ghostscript  
   "c:\aladdin\gs5.99\gswin32c.exe"
   -I"c:\aladdin\gs5.99\lib;c:\aladdin\fonts"
With a configuration file like this, you can print a monochrome PostScript file with
gsprint golfer.ps
or a colour file with
gsprint -colour colorcir.ps
Config file options must be one per line. Other configuration files may be used with the command line option "-config filename.cfg"

Licence

GSPRINT is Copyright (C) 1999-2000 Ghostgum Software Pty Ltd.

GSPRINT comes with NO WARRANTY and NO SUPPORT.
You may use gsprint to assist printing with Ghostscript.
You must not sell gsprint or give it to anyone else.
You must not make gsprint available for download from any site other than ftp://ftp.cs.wisc.edu/ghost/ghostgum/beta/
Active mirror sites may make it available, provided they also remove files automatically.
Currently, no payment is required to use gsprint.

Availability

The latest version should be available from the directory
ftp://ftp.cs.wisc.edu/ghost/ghostgum/beta/
Look for the latest file named gsprint*.zip. gsprint is available precompiled. Sources are not available.

To use GSPRINT you must have Aladdin Ghostscript 5.99 TESTER RELEASE or later, This is currently available from:

ftp://ftp.cs.wisc.edu/ghost/aladdin/test/gs599w32.exe

Bugs, Suggestions

The guts of gsprint will eventually become part of GSview. In the meantime, please test gsprint and send bug reports and suggestions to:

Russell Lang
2000-01-11