www.delorie.com/gnu/docs/a2ps/a2ps_142.html   search  
 
Buy GNU books!


General Purpose PostScript Generating Utility

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.2.6 How Can I Print on Non PostScript Printers?

I use a2ps at work and wish to use it at home, but my printer is not PostScript. How can I do?

Ghostscript might be the tool you need (see section A. Glossary). It support conversion to many different non PostScript printers.

Here are some tips on how to use a non PostScript printer. If somebody feels like writing a more precise documentation, she really is welcome.

Please refer to the Ghostscript documentation for a precise description of the tuning you need.

Basically, the first step you need is to achieve to call Ghostscript in a pipe chain. In other words, try to find out the right arguments Ghostscript needs in order to print with a command like this:
 
$ cat file.ps | gs more arguments

In general it is the same command as for calling Ghostscript with a filename, except that the file name to use is `-':
 
$ cat file.ps \
  | gs -q -dNOPAUSE -sDEVICE=deskjet -sOutputFile=- - -c quit\
  | lp -dprinter-name

Once it works, it is then easy to settle the right Printer: line in your configuration file (see section 4.5 Your Printers). For instance:
 
Printer: djet \
  | gs -q -dNOPAUSE -sDEVICE=deskjet -sOutputFile=- - -c quit\
  | lp -d djet

Christian Mondrup uses a2ps under Windows with a non PostScript printer. He uses:
 
DefaultPrinter: | //c/gstools/gs5.10/Gswin32c.exe         \
   -Ic:\gstools\gs5.10;c:\gstools\gs5.10\fonts            \
   -sDEVICE=ljet4 -sPAPERSIZE=a4 -dNOPAUSE -r300 -dSAFER  \
   -sOutputFile="\\spool\HP LaserJet 5L (PCL)"            \
   -q - -c quit


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003