Operating System - HP-UX
1748089 Members
5111 Online
108758 Solutions
New Discussion юеВ

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

 
Muller, W.D.
Occasional Advisor

HowTo add printcontrol "&a180P" to my spoolrequest?

Hi all

I want all the output, produced by a HPLJ 9050n, to be rotated 180 degrees. Not upside down, but just a horizontal rotation.
Manually adding the lp option "-orotate" does the trick with plain textfiles, but not with files containing any barcodes.

This printer is configured as a remote printer, with the remote host being its IP Adress. That's probably the reason why I cannot find a modelscript residing in "/etc/lp/interface/model.orig" with my printername.

All printers created as a Network-Based printers connected to HP Jetdirect, have an associated modelscript (model.orig), in which I then could state: rotate="yes".

Yes:-)I first thought this would be the solution and I configured the printer using the JetDirect interface. But with the rotate="yes" option, all output is completely garbled, and instead of 1 page of output it sends out 20 or more empty pages for every spoolrequest.
So this option is not valid/useable.

So being a remote tcp printer, another option would be: adding the printcontrol "&a180P" to any spoolrequest.
But the lp interface for remote spooling in "/etc/lp/interface/" has no valid options for adding "&a180P".

Has anyone experience with adding the rotation-option to the lp interface ecspecially for remote tcp-printers?

I would be very gratefull if someone could help me out and give me a hint.

Waldemar




13 REPLIES 13
Muller, W.D.
Occasional Advisor

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

Thanks a lot for pointing out some urls of interest. However, none of them seem to resemble my problem.
Thx anyway.:-)
Bill Hassell
Honored Contributor

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

> This printer is configured as a remote printer, with the remote host being its IP Adress. That's probably the reason why I cannot find a modelscript residing in "/etc/lp/interface/model.orig" with my printername.

Exactly. When you configure a "remote printer" you lose all of the -o options and there will be no modifications to the print job. A remote printer is assumed to be connected to some PC server. So all you can do is to modify the printjob before it is printer, like this:

cat /etc/rotate.conf /someplace/myprintfile | lp -oremoteprn

Did you download and install the LJ 9050 model script? All the new model scripts are located here:

http://www.hp.com/pond/modelscripts/index2.html

Note also that "&a180P" will not work. This is a PCL escape sequence so the correct string requires the ESCAPE character. When you insert an escape sequence like this, it must not be followed by model script initialization like a printer reset.

> barcodes...

This sounds like you are creating fairly complex PCL documents, and barcodes are special graphics forms that may not survive a &a180P effects. You'll need to consult the PCL manuals for better explanations:

http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13210/bpl13210.pdf

http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13211/bpl13211.pdf


Bill Hassell, sysadmin
Muller, W.D.
Occasional Advisor

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

Hello Bill,

>Did you download and install the LJ 9050 model script?

Yes I did download "net_ljM9050MFP" and...

1)Configured the printer correspondingly as a networking-based printer.
- set rotate="yes" fixed value.
- testprints Unix shell were fine

2)Configured the printer, connected to a remote Windows Spool Server. No need to adapt the modelscript. Windows driver has its 180 degrees page-orientation on-board:-(
- testpages Windows were fine too.

>So all you can do is to modify the printjob before it is printer, like this:
>cat /etc/rotate.conf /someplace/myprintfile | lp -oremoteprn

Correct, adding/concatenating the original printfile with the "rotate option" for sure would solve the problem.
However then I should be able to intercept the printfiles before they are sent (from SAP) to the Unix spool, or.... as soon as they're created in "var/spool/lp/requests"?

>"&a180P" will not work
Correct, must be "[&a180P"

I cannot find a way to intercept the spoolfiles, because they're created within a SAP application which I cannot temper with.

Any further ideas how to handle my issue?

Waldemar
Dennis Handly
Acclaimed Contributor

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

>because they're created within a SAP application which I cannot temper with.

If it uses lp(1) or a model script, you can fiddle with those. The latter was what some of those threads were about.
Muller, W.D.
Occasional Advisor

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

Hi Dennis,

Yes SAP uses our lp spooler.
manual action (root):
- disabled printer
- added the escapesequences to the top of the spoolrequest
- enabled printer
- output correct(slightly:-))

Question: How can I "fiddle" with lp and perform above (manual)actions automatedly?

Waldemar
Dennis Handly
Acclaimed Contributor

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

>How can I "fiddle" with lp and perform above (manual) actions automatically?

By modifying the model script to add that escape sequence. Perhaps this thread may help:
http://h30499.www3.hp.com/t5/System-Administration/Modification-of-the-Banner-Page-in-HP-UX-11-31/m-p/4750211#M388165

Muller, W.D.
Occasional Advisor

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

Dennis, i owe you an apology.

Adapting the modelscript (configured as networkprinter) I tried before I posted this case.

Indeed the last url (your first answer)

http://h30499.www3.hp.com/t5/General/how-to-direct-print-job-to-a-particular-tray-from-Unix-using/m-p/4145845#M133579


resembles almost 98% my case.
SAP overrides all changes in the modelscript.

so I'm stuck:-(

Bill Hassell
Honored Contributor

Re: HowTo add printcontrol "&a180P" to my spoolrequest?

The JetDirect model scripts (ie, /opt/hpnpl/sh/net_*) are quite convoluted so finding the right place to insert the code is a challenge. The script will prepend a lot of escape sequences in front of the job so its important to place the echo of the rotate string just before the file is cat'ed.

On the other hand, if SAP embeds ESC-E (reset) into the print job, you are indeed out of luck. You'll have to replace the printer with a model that works OK.


Bill Hassell, sysadmin