Simple Customization to Support A3 Paper on HPLJ-4MV


Contents

About this document
Overview
Sample script

About this document

This document contains a shell script for making a simple modification to an HPLJ-4MV virtual printer queue to support the A3 paper type when using the qprt print flag -Q3. The modification was made to the HP LaserJet 4V virtual printer at AIX 4.2.1, but should work at other levels.

The same command should also work for a PCL queue, but in that case, the formatting may have to be changed, or you may have to also use the -w flag for width and the -l flag for lines on the page.

This document applies to AIX 4.x.


Overview

This script works by using the lsvirprt command to change the virtual printer attribute es which creates the command that is sent to the printer for setting the printer size. This command also changes the WP attribute which sets the SMIT menu selection ring list and the allowed command line options.

The PCL command for setting the printer page size is Esc&l##A. For the A3 paper size the command becomes Esc&l27A.

This document does not go in depth about changing the formatting page size options within the virtual printer. Therefore, if you use this for PCL text queues, you may find the pages are truncated or lines wrapped if you do not use the -w and -l flags or set these specifically in the virtual printer.

These commands could also be done manually with lsvirprt by first choosing the print queue and then typing the commands:

  es=\33&l.... as shown below
and
  WP=R[letter,legal,A3,A4,exec=1,2,3,4,5] 
As you can see the es attribute is very long and it is easy to make typographical errors. For this reason it may be easier to use the shell script shown below.


Sample script

#!/bin/ksh
# Example script to permit A3 using -Q3 on HP LaserJet 4MV printer using
# the HP LaserJet 4V driver in AIX 4.2.1
# This was developed to support the GL queue, and additional work on
# the wJ wK wM and wR attributes may be needed if you want formatting to
# work properly if you try this on the pcl queue. See
# AIXPRINT FORUM appended at 21:59:05 on 98/02/18 GMT (by D03CCEN at BLDLMS)
# PostScript handles paper size internally, so has always worked fine.
q=hp_gl    # Queue name  <------- set what yours is called here
d=lp0      # Device name <------- set what yours is called here
# List them out first, so if disaster strikes you know what was there...
lsvirprt -d $d -q $q -a es
lsvirprt -d $d -q $q -a WP
chvirprt -d $d -q $q -a es='\33&l%G_Q%Pq%?%G_u%{3}%<%G_u%{5}%>%|%t%?%gq%{1}%=%t2%e%gq%{2}%=%t3%e%gq%{3}%=%t27%e%gq%{4}%=%t26%e%gq%{5}%=%t1%e2%;%e%?%gq%{1}%=%t80%e%gq%{3}%=%t81%e%gq%{4}%=%t90%e%gq%{5}%=%t91%e80%;%;A'
chvirprt -d $d -q $q -a WP='R[letter,legal,A3,A4,exec=1,2,3,4,5]'




[ Doc Ref: 92220548912718     Publish Date: Oct. 17, 2000     4FAX Ref: 6456 ]