[comp.lang.postscript] Paper output on laserjet IIID ?

laurie@hplvec.LVLD.HP.COM (Laurie Schaaf) (01/17/91)

Can any of you postscript guru's help me out on this please --
I have a model script that runs on an hp9000 model 350 running
8.0 HP-UX.  Off the client of this system is a laserjet IIID with
a postscript cartridge that has dual paper trays.  What I want to do 
is run the bottom tray with colored paper for the banner page and
the top tray with white paper for the job to be processed.  Since
this is a lab wide printer I want to differentiate the jobs with
the colored paper.  From reading the manual that came with the
postscript cartridge I need to issue the command "statusdict begin"
and set the parameter to setpapertray; 0=top tray, 1=lower tray.
Following is the part of the model script for the banner which
I am working with.  This works but everything comes out the top
tray.  When I try to execute the statusdict anywhere inside this
I get error messages that the command is not recognized.  
Any and all suggestion/solutions would be appreciated.

Thanks in advance,
Laurie Schaaf
laurie@hpisla
1-303-679-3225




# Output the banner page

if [ $banner = 1 ] ; then
     # decide on the character for the border - use the current second
     #  as a pseudo-random index into ZapfDingbats
     C=`echo | nawk '{i='\`date +%S\`'; 
		 c=substr("01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",i,1);
	 print c;
		 }'`
    C=${C:-'O'}

    echo "gsave" 
    echo "($user) ($reqid: $title)"
    echo '/idnum exch def' 
    echo '/user exch def'
    echo '612 0 translate 90 rotate'
    echo '/ZapfDingbats findfont 30 scalefont setfont'
    echo "($C) stringwidth pop 30 exch sub /inc exch def"
    echo "/s0 ($C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C) def"
    echo '36 30 100'
    echo '{ dup 36 exch moveto inc 0 s0 ashow'
    echo 'dup 450 add 36 exch moveto inc 0 s0 ashow'
    echo '90 add 90 460'
    echo "{ dup 36 exch moveto inc 0 ($C$C$C) ashow"
    echo "666 exch moveto inc 0 ($C$C$C) ashow"
    echo '} for'
    echo '} for'
    #echo '/ZapfChancery-MediumItalic findfont dup setfont'
    #echo '504 user stringwidth pop div'
    #echo 'dup 324 gt { pop 324} if'
    #echo 'dup /sz exch def'
    #echo 'scalefont setfont'
    echo '/ZapfChancery-MediumItalic findfont dup setfont'
    echo '504 user stringwidth pop div'
    echo 'dup 150 gt { pop 150} if'
    echo 'dup /sz exch def'
    echo 'scalefont setfont'
    echo 'newpath 0 0 moveto user false charpath pathbbox'
    echo '2 div 306 exch sub exch 2 div 396 exch sub exch'
    echo 'moveto pop pop user show'
    echo '/Helvetica-Bold findfont 12 scalefont setfont'
    echo '130 470 moveto idnum dup show'
    echo 'dup stringwidth pop 662 exch sub 130 moveto show'
    echo 'showpage'
    echo 'grestore'
    echo '\004\c'		# This is to fix defect in HP 33438P
				# cartrigde.
fi


# Set up global items:
if [ "$duplex" = 1 -a "$raw" = 0 ] ; then
    echo "/Default"
    echo "{"
    echo "statusdict begin"
    echo "true setduplexmode"	    # persists for this job only
    echo "false settumble"	    # persists for this job only
    echo "end"
    echo "} def"
    echo "Default"
fi


________________________________________________________________________

psewall@hpdmd48.boi.hp.com (Pat Sewall) (01/19/91)

/ hpdmd48:comp.lang.postscript / laurie@hplvec.LVLD.HP.COM (Laurie Schaaf) /  4:12 pm  Jan 16, 1991 /

Can any of you postscript guru's help me out on this please --
I have a model script that runs on an hp9000 model 350 running
8.0 HP-UX.  Off the client of this system is a laserjet IIID with
a postscript cartridge that has dual paper trays.  What I want to do 
is run the bottom tray with colored paper for the banner page and
the top tray with white paper for the job to be processed.  Since
this is a lab wide printer I want to differentiate the jobs with
the colored paper.  From reading the manual that came with the
postscript cartridge I need to issue the command "statusdict begin"
and set the parameter to setpapertray; 0=top tray, 1=lower tray.
Following is the part of the model script for the banner which
I am working with.  This works but everything comes out the top
tray.  When I try to execute the statusdict anywhere inside this
I get error messages that the command is not recognized.  
Any and all suggestion/solutions would be appreciated.

Thanks in advance,
Laurie Schaaf
laurie@hpisla
1-303-679-3225




# Output the banner page

if [ $banner = 1 ] ; then
     # decide on the character for the border - use the current second
     #  as a pseudo-random index into ZapfDingbats
     C=`echo | nawk '{i='\`date +%S\`'; 
		 c=substr("01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",i,1);
	 print c;
		 }'`
    C=${C:-'O'}

    echo "gsave" 
    echo "($user) ($reqid: $title)"
    echo '/idnum exch def' 
    echo '/user exch def'
    echo '612 0 translate 90 rotate'
    echo '/ZapfDingbats findfont 30 scalefont setfont'
    echo "($C) stringwidth pop 30 exch sub /inc exch def"
    echo "/s0 ($C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C$C) def"
    echo '36 30 100'
    echo '{ dup 36 exch moveto inc 0 s0 ashow'
    echo 'dup 450 add 36 exch moveto inc 0 s0 ashow'
    echo '90 add 90 460'
    echo "{ dup 36 exch moveto inc 0 ($C$C$C) ashow"
    echo "666 exch moveto inc 0 ($C$C$C) ashow"
    echo '} for'
    echo '} for'
    #echo '/ZapfChancery-MediumItalic findfont dup setfont'
    #echo '504 user stringwidth pop div'
    #echo 'dup 324 gt { pop 324} if'
    #echo 'dup /sz exch def'
    #echo 'scalefont setfont'
    echo '/ZapfChancery-MediumItalic findfont dup setfont'
    echo '504 user stringwidth pop div'
    echo 'dup 150 gt { pop 150} if'
    echo 'dup /sz exch def'
    echo 'scalefont setfont'
    echo 'newpath 0 0 moveto user false charpath pathbbox'
    echo '2 div 306 exch sub exch 2 div 396 exch sub exch'
    echo 'moveto pop pop user show'
    echo '/Helvetica-Bold findfont 12 scalefont setfont'
    echo '130 470 moveto idnum dup show'
    echo 'dup stringwidth pop 662 exch sub 130 moveto show'
    echo 'showpage'
    echo 'grestore'
    echo '\004\c'		# This is to fix defect in HP 33438P
				# cartrigde.
fi


# Set up global items:
if [ "$duplex" = 1 -a "$raw" = 0 ] ; then
    echo "/Default"
    echo "{"
    echo "statusdict begin"
    echo "true setduplexmode"	    # persists for this job only
    echo "false settumble"	    # persists for this job only
    echo "end"
    echo "} def"
    echo "Default"
fi


________________________________________________________________________
----------