To see which printers are available from your current machine use the following Solaris 2.x command:
Under Solaris 1.x, either look in the /etc/printcap file or run:
The lpc command can also be used to fix problems with the printers.
There are two commands which allow you to print: lpr and lp. lpr is the BSD command which you are used to from our SunOS machines. Here is a synopsis of general commands:
lpr -Pscrap image.ps | Print a PostScript image to the scrap paper printer. |
lpr -s image.ps | Use the full pathname of the file to print instead of copying the file. Don't modify the file until printing is finished. |
The other printing command, lp, is the SVR4 version of lpr, with completely different options, of course:
lp -d scrap image.ps | Print a PostScript image to the scrap paper printer. |
lp image.ps | Use the full pathname of the file to print instead of copying the file. Don't modify the file until printing is finished. Notice that this is the default! |
lp -c image.ps | Make a copy of the file before printing. This is the default when using lpr. |
In general, you only want to print Sun Raster images to this printer, mainly because they will be resized to fit the size of the paper. Since we are using Sun's Newsprint software, the raster format is automatically detected and dealt with appropriately.
If you have a problem which isn't covered here, check the APUNIX manual. It is in a brown binder labeled:
Occasionally, the image will appear too dark and a lot of subtle detail will be lost. To fix this, you need to manipulate the raster file with some programs from the Newsprint distribution. There are at least four commands you need to know: rasttopnm, pngamma, pnmscale and rastocp.
rasttopnm is used to convert the raster file to the pnm format. Usage:
pngamma is used to adjust the gamma of the image. A number higher than 1.0 will make the image print lighter and a number less than 1.0 will darken it. Usage:
pnmscale is used to adjust the size of a pnm image. Since the image is no longer a raster file, it won't automatically be fitted to the paper size. For 8.5x8 inch paper, 1280x940 pixels will use the full area. Usage:
rastocp will copy the input to the CP210 device (/dev/bpp0 under Solaris 1.x). Piping output from the above commands into lpr doesn't work because output isn't in raster format. Usage:
Now we have to put these commands together to make it all work. In general you just do the following:
By playing around with the gamma value, you should be able to get the image to come out looking pretty nice.