[GRASS5] new scripts for GRASS 5.7 - png output

Radim,

As I mentioned before, I wanted to try this and couldn't find it at first. After your message, I realized it was the nice printer button on the right (duh!)

Anyway I tried it. The interface is great. It appears that it requires Ghostscript. I have ghostscript, but had to get my path to its nonstandard location set (/sw/bin) before the print module would work. The ghostscript and (path adjustment if necessary) needs to be specified in the GRASS 5.7 requirements if it is going to be the standard way to do printing.

I ran into a couple of problems.

First, when I looked at previews, PDF's, and PNG's created, it only printed the vectors. The nice raster map under the vectors was ignored.

Second, when I actually tried to print to my printer (using the gimpprint/cups/ghostscript output), I got garbage. Perhaps I didn't specify it correctly. I left it at lpr thinking it would send to the default printer. It did print on my Epson inkjet, but, as I said, it was garbage.

Michael

On Monday, April 5, 2004, at 02:45 AM, Radim Blazek wrote:

PNG may be also written from 'Print' dialog in d.m. It does not support
all d.* commands because it uses ps.map, but supports line width.

Radim

______________________________
Michael Barton, Professor & Curator
Department of Anthropology
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671

Michael Barton wrote:

Anyway I tried it. The interface is great. It appears that it requires
Ghostscript. I have ghostscript, but had to get my path to its
nonstandard location set (/sw/bin) before the print module would work.
The ghostscript and (path adjustment if necessary) needs to be
specified in the GRASS 5.7 requirements if it is going to be the
standard way to do printing.

You shouldn't need Ghostscript in order to print to a PostScript
printer. However, you will need it if you wish to view PostScript
files on screen, convert them to other formats (e.g. PDF, or image
formats such as PNG), or print to a non-PostScript printer.

Second, when I actually tried to print to my printer (using the
gimpprint/cups/ghostscript output), I got garbage. Perhaps I didn't
specify it correctly. I left it at lpr thinking it would send to the
default printer. It did print on my Epson inkjet, but, as I said, it
was garbage.

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.

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

On Tuesday, April 6, 2004, at 01:10 AM, Glynn Clements 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?

______________________________
Michael Barton, Professor & Curator
Department of Anthropology
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671

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@virgin.net>