ras2rpdl

Section: WIN SYSTEM (1W)
Updated: 1998.5.12
Index Return to Main Contents
 

NAME

ras2rpdl - Filter for converting Sun Raster format image to RPDL language  

SYNOPSIS

ras2rpdl [ file ] ...

 

DESCRIPTION

Ras2rpdl is a filter used to print Sun Raster format images, such as pmon(1W) printouts, by Ricoh RPDL-compatible printer. An image resolution of 400 dpi is assumed. The maximum printable image size is 4,516 x 3,136 dots. Ras2rpdl loads image data from the standard input and writes the output data in a compressed format to the RPDL printer via the standard output. If file ... is specified, however, data will be loaded from the file. When there are more than one file, the print jobs will be processed on a one-file-one-page basis. If the printer has a double-side printing capability, the output will be printed on both sides (one file worth of output data on each side).

Ras2rpdl has been tested only on Ricoh SP-10PS proIInw.  

OPTIONS

None
 

SEE ALSO

pmon(1W), lpf_lbpvf(1W), ras2lips(1W)  

Typical settings for a BSD-derived UNIX system to print two pages on both sides of one sheet

Assume that in /etc/printcap, a Ricoh RPDL-compatible printer ricoh-ps and a double-side printout entry ricoh are set as follows:
ricoh|remote printer (Ricoh PS):\
        :sd=/var/spool/ricoh:mx#0:sh:\
        :lf=/var/spool/ricoh/log:\
        :lp=:rm=ricoh:rp=lpb:
ricoh2|two-side remote printer:\
        :sd=/var/spool/ricoh:\
        :lp=/dev/null:mx#0:\
        :lf=/var/spool/ricoh/log:\
        :if=/home/auto/j2ps:\
        :vf=/home/auto/ras2rpdl2:

The content of the filter /home/auto/ras2rpdl2 should be as follows:

#!/bin/sh
sf1=/var/spool/ricoh/ras2rpdl2.1
sf2=/var/spool/ricoh/ras2rpdl2.2
if [ -f "$sf1" ]
then
  cat > $sf2
  /home/auto/ras2rpdl $sf1 $sf2 | /usr/ucb/lpr -Pricoh >/dev/null 2>&1
  rm $sf1 $sf2
else
  cat > $sf1
fi

Additionally, the content of /home/auto/j2ps goes as follows:

#!/bin/sh
/bin/jtops -v | /usr/ucb/lpr -Pricoh >/dev/null 2>&1
 

Typical settings for a Solaris 2.X system to print two pages on both sides of one sheet

Assume that the network remote printer ricoh is already set with the host name being ricoh as follows:
lpsystem -t bsd ricoh
lpadmin -p ricoh -s ricoh -T unknown -I any
accept ricoh
enable ricoh

First, copy and edit a standard printer interface program.

cp /var/spool/lp/model/standard /home/auto/ricoh2
vi /homr/auto/ricoh2

Insert

FILTER=/home/auto/ras2rpdl2

between the two lines. Then, rewrite

trap 'cd ${TMPDIR};rm -fr ${TMPPREFIX}*; exit ${exit_code}' 0

into

trap 'rm -fr ${TMPPREFIX}*; exit ${exit_code}' 0

(Otherwise,

an "rm: start directory cannot be opened: no permission given"

error message somehow occurs, making rm impossible!?). At this point, the content of /home/auto/ras2rpdl2 goes as follows:

#!/bin/sh
dir=/tmp
sf1=ricoh2.1
sf2=ricoh2.2
#
cd $dir
if [ -f "$sf1" ]
then
  cat > $sf2
  /home/auto/ras2rpdl $sf1 $sf2|/usr/bin/lp -d ricoh>/dev/null 2>&1
  rm $sf1 $sf2
else
  cat > $sf1
fi

Then, register ricoh2 printer as follows:

lpadmin -p ricoh2 -v /dev/null -I raster -i /home/auto/ricoh2
accept ricoh2
enable ricoh2

Now every other time

lp -d ricoh2 -T raster [ raster file ]

prints out (two pages), a sheet will be printed front and back.  

OPTIONS

None
 

SOURCE

`ras2rpdl.c'
 

SEE ALSO


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO
Typical settings for a BSD-derived UNIX system to print two pages on both sides of one sheet
Typical settings for a Solaris 2.X system to print two pages on both sides of one sheet
OPTIONS
SOURCE
SEE ALSO