Operating System - HP-UX
1748051 Members
4868 Online
108758 Solutions
New Discussion юеВ

Re: Fit to page when printing with lp on A3 paper?

 
SOLVED
Go to solution
M.Boeijen
Advisor

Fit to page when printing with lp on A3 paper?

On an HP-UX 11 server we configured a Xerox Workcentre 7345ps printer, using the 'Generix PCL3' type. The following command is used to grab/capture a window and print it on A3 paper located in the upper tray of the Xerox printer:

/usr/bin/X11/xwd |/usr/contrib/bin/X11/xpr -landscape -device pjetxl -density 600 -gamma 3lp -oA3 -oubin -onb -odq -s -d

The result is a landscape color print on A3. Only problem is that the size of the printed area is A4. The question is how we can get the screen capture printed 'fit-to-page' (A3)?

4 REPLIES 4
Matti_Kurkela
Honored Contributor
Solution

Re: Fit to page when printing with lp on A3 paper?

"HP-UX 11" is ambiguous: do you mean 11.00, 11.11, 11.23 or 11.31?

The "-device pjetxl" option tells the xpr command to create HP PaintJet XL-compatible PCL output. I guess this is the only reasonable choice among the available ones, right?

All the -o... options are passed to the printer model script, which must recognize the options to make them effective. Different model scripts support a different set of -o options.

If you're using the updated "generic PCL3" model script from http://www.hp.com/pond/modelscripts/index2.html then all the -o options you're using seem to be supported, so in that case the A3 paper size option will be effective.

The problem is probably that the xpr command will only produce an output sized as 8x10.5 inches by default. Neither the spooler nor the model script implement any real output scaling for PCL print jobs: it would be necessary for xpr to generate a large enough set of output pixels to cover an A3 paper.
(If I understand correctly, the 2up/4up options are implemented at the printer level, so the model script only needs to send a proper control code to activate them.)

To make xpr produce larger output, you'll have to use its -width and -height options.

Try this:

/usr/bin/X11/xwd |/usr/contrib/bin/X11/xpr -landscape -device pjetxl -density 600 -gamma 3 -width 10.5 -height 16 | lp -oA3 -oubin -onb -odq -s -d

The values for the -width and -height options are in inches. I don't know if the options will determine the printable area size before or after the -landscape option takes effect: if the output looks seriously wrong, try "-width 16 -height 10.5" instead.
You may have to tweak the values to get the output look nice.

MK
MK
M.Boeijen
Advisor

Re: Fit to page when printing with lp on A3 paper?

Thanks for your reply Matti,

FYI: we're using 11.23.

I'll see if your suggestion helps. But that'll be this Thursday.... so, to be continued.

I don't know if the 'standard' HP-UX 11.23 installation includes other tools for screen capturing. Maybe there's other path of dumping the screen/active window to the printer producing fit-to-page A3 results?!?

Bye,
Marc
M.Boeijen
Advisor

Re: Fit to page when printing with lp on A3 paper?

Using the extra width/heigth arguments results in a larger print on the A3 format. So, problem solved. Thanks again!
M.Boeijen
Advisor

Re: Fit to page when printing with lp on A3 paper?

Problem solved.