Operating System - HP-UX
1833347 Members
3532 Online
110051 Solutions
New Discussion

Line printer script that reduces 17X11 to print on 8 1/2 X11

 
Doug_85
Regular Advisor

Line printer script that reduces 17X11 to print on 8 1/2 X11

Problem: A program that runs on unix prints most reports on 8 1/2 X 11 but has a few reports that are formatted for 17X11. The program itself cannot be edited since we have no access to the source code. Besides buying everyone a line printer to print these reports, does someone have a script for HP Laser Jet 5SI/5Si MX PS (or any laser jet) that will convert these large reports from 17 X 11 into 8 1/2 X 11. Or can someone modify the current script I have to work with these reports.

Attached is the file from my current printer configuration. This file is from the following directory:

/etc/lp/interface/model.orig>budget

My current version of unix is HP-UX 11.0

Thanks,
Doug
2 REPLIES 2
Bill Hassell
Honored Contributor

Re: Line printer script that reduces 17X11 to print on 8 1/2 X11

This is an enormous task and not a scriptable task if the report is in PCL rather than Postscript. PCL code is not easily scalable, so bitmaps, graphics, even the font for the text must be resized, something that would take days to learn PCL, days to analyze the report's PCL code and days to figure out and test a method to send the correct sequences. The 5Si does have a major advantage in that it's formatting engine knows how to scale so the task is probably do-able, but it will take some effort scouring through the PCL-5 Technical reference manual. Note that only ther newer and larger HP LaserJets have this capability so you'll have to limit the printer choices for this report.

If the report is in Postcript format, the job is somewhat simplified in that Postscript can define the printable area and overall setup codes at the front of the job may be able to setup scaling values for all objects (text, lines, graphics, images). But like PCL, there are many, many directives, some of which may not scale. You'll need a good Postscript programming manual. (Postscript is actually a program which is interpreted by the printer's formatting engine). Again, scripting may not be powerful enough for the task. Perl is a good start.


Bill Hassell, sysadmin
Steve Steel
Honored Contributor

Re: Line printer script that reduces 17X11 to print on 8 1/2 X11

Hi


1)This is not the real script but the standard script of Jetadmin to fix the networking

Look in /etc/lp/interface/model.orig

2)These script have a manpage

export MANPATH=/opt/hpnp[l]/man

Then man net_lj5x

You should be able to use parameters to resize . It does depend on the format of your report.

3)Use lpshut;lpsched -v and let it run for a while and /var/spool/lp/log will give you some good info.

Steve STeel
If you want truly to understand something, try to change it. (Kurt Lewin)