/ jansonius / scientific software / printing

Printing from DOS in the 3rd Millennium


Introduction

A common misunderstanding is that DOS cannot be used anymore because of lack of DOS support for any modern printer. However, to keep DOS running, a Linux-like solution can be used: GhostScript. Lots of well written "Printing from Linux" documentation can be found on the internet. Below I will give a short summary, directed towards DOS users.


Suitable printers for DOS

As a first step, a suitable printer has to be found. A suitable printer for DOS/Linux (1) has a parallel port and (2) understands at least one of these languages: PCL or IBM proprinter. Hence, do not buy a cheap USB only Windows only printer. A good option is a (second-hand) matrix printer (robust and low maintainance costs) or a (second-hand) HP deskjet printer (most - but not all - from the 4xx - 9xx series and some more recent ones have a parallel port and understand PCL). For high performance: most laser printers, except for some very cheap low-end models, have a parallel port and understand PCL.


Printing

All applications should print to a PostScript file (e.g. output.ps). Subsequently, this PostScript file is printed using GhostScript. GhostScript for DOS sends its output by default to PRN (usually LPT1). Hence, the printer must be connected to the parallel port.

GhostScript batch file gs.bat as included in the versions as offered here gives syntax examples for commonly used printers - remove one of the "REM" to select the appropriate one. Device IBMpro can be used for matrix printers, device deskjet (b/w; fast) or cdj550 (colour; slow) for deskjet printers (PCL3), and device ljet3 for laser printers (PCL4, PCL5). In the case of a matrix printer, possibly you have to adjust resolution (the default 120x180 used to work fine for my NEC P2200). For recent laser printers, device ljet4 may be tried (PCL5e, PCL6), which should allow for 600 dpi instead of 300 dpi (replace ljet3 by ljet4 and -r300 by -r600 in gs.bat; ljet4 with -r600 works fine for my Epson EPL-6200 [not to be mixed-up with the EPL-6200L]).

To print a file named output.ps:

gs path\output.ps

assuming you are in c:\gs.

If everything fails, batch file gs.bat has to be edited (or another printer should be tried). Other devices supported by the GhostScript version used can be found by typing gs386 -h (or gs16bit -h in the case of version 2.61). To see what device should work with your printer, look here. This list is a good starting point anyway: do not buy a printer that is not supported by your version of GhostScript!

Note: GhostScript may not be able to activate all the specifications as claimed to be present in your printer. This should not be mixed up with "printer cannot be used with DOS/Linux". GhostScript does what it should do: print a document. After all, for example, not many people are able to see the difference between 600 and 1200 dpi (without a direct comparison with a magnifier).


latest update: 6-5-2008