1833019 Members
2358 Online
110049 Solutions
New Discussion

force printer to use A4

 
SOLVED
Go to solution
Court Campbell
Honored Contributor

force printer to use A4

This is mainly for Oracle financials. I have a user overseas who does not like having the A4 style before printing a report from Oracle. I see this as a personal problem, but I thought I might poke around. I was wondering if there is a way to force a print requests for an lp printer to always be A4 for that printer. I thought about modifying the printer script, but I wanted to see if anyone had any other ideas.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: force printer to use A4

Depending upon the printer's interface file, you could change
paper="def"
to
paper="ISOA4"
for example
but the exact changes would depend upon the interface/model script for that particular printer. The downside to making a change in the default like this is that you may break other applications which assume that default means as selected by the front-panel. I would be tempted to set up a custom queue (printer) for this user and then modify it and leave the original queue unchanged. Of course the other approach would be to tell the user to get a life.
If it ain't broke, I can fix that.
Peter Godron
Honored Contributor

Re: force printer to use A4

Hi,
the way I see it, you can try:
lp -oa4 file
or
configure the printer from the printers own menu
or
only load A4 paper ;-)

Please let us know how you get on!
Court Campbell
Honored Contributor

Re: force printer to use A4

Peter,

The lp command is issued by Oracle. I wish it was as easy as just adding the -oa4 option. But the way that printers get defined in oracle is cattywampus (in my opinion). If I change the way printer is defined in Oracle it will affect many a user. But if I can just modify the printer defaults on the UNIX side I should be OK. There are only to users that print to the printer and they both have the same issue. I am trying to find a KISS workaround instead if having to tell the Oracle apps people that they will need to modify reports, etc. In the end the true solution is that the user should select the A4 style in Oracle. But the user is not happy with that. The day i understand why people have ridiculous requests is the same day I am buying a lottery ticket.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Bill Hassell
Honored Contributor

Re: force printer to use A4

Yes, that is the correct method. The script will be in the /etc/lp/interface directory. Now if the printer is connected using an HP JetDirect LAN card, the interface script is just the network code while the printer's formatting script is located in /etc/lp/interface/model.orig. Look for the setting list where the defaults are listed and change the paper size.


Bill Hassell, sysadmin
Court Campbell
Honored Contributor

Re: force printer to use A4

Bill,

Printer is connected via jetdirect. I edited the file in the model.orig dir. Going to see if that will resolve the issue, or if something else is required. I was one step ahead of you from a post I found through a google search. Low and behold you were one of the people in the post:

http://marc2.theaimsgroup.com/?l=hpux-admin&m=96398925152271&w=2

Bill, you are everywhere.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"