[GRASS5] new scripts for GRASS 5.7 - png output

Glynn Clements glynn.clements at virgin.net
Tue Apr 6 14:57:19 EDT 2004


Michael Barton wrote:

> > The print command (which appears to default to "lpr") needs to accept
> > a PostScript stream. You may need to use "lpr -P<printer>" to select a
> > PostScript "printer" (i.e. a virtual printer, which is actually a
> > Ghostscript command which converts PostScript into a format which your
> > printer understands).
> >
> > Start by generating a PostScript file which you can view successfully
> > using Ghostscript (either directly or via e.g. "gv"). Then figure out
> > a command which will print that file when it is supplied on stdin.
> 
> Couldn't (and shouldn't) this be done by the print dialog program?

What do you mean by "the print dialog program"?

If this is something related to CUPS, d.m doesn't use CUPS. It handles
graphical printing the same way as every other Unix program has done
for the last two decades: generate a PostScript stream and feed it to
a user-supplied command.

In turn, that requires that the user can provide a command which will
print PostScript. Assuming that lpr/lpd are installed and set up
correctly[1], the command will probably be "lpr -P<printer>"[2], where
<printer> is the name of the PostScript printer which you wish to use.

[1] If your printer doesn't support PostScript directly, the
/etc/printcap configuration will typically involve a print filter
which uses Ghostscript to provide a "virtual" PostScript printer.

[2] There are other possibilities. E.g. you could use a printer which
is attached to a Windows box via the "smbprint" script.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list