- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- hppi printing multiple pages
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2004 09:03 AM
12-15-2004 09:03 AM
I have set up several printers using hppi.
Mostly HP laserjet printers. On the printer I set the option to print 3 copies. But when I do a lp -dprinter file only one copy comes out.
When I print something from windows notepad 3 copies come out. I can not use the -n option of lp because I need this to work from within an application. Makes me think there is a setting somewhere in the printer queues that is limiting it to one copy but I cant find it.
OS hp-ux 11.11 fairly up to date with patches
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2004 09:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2004 01:42 PM
12-15-2004 01:42 PM
Re: hppi printing multiple pages
So in Windows, the printer is automatically sent a series of setup codes, and with WinXP or Win2K, Notepad is no longer a simple text editor. Notepad has the ability to change fonts.
But in Unix, there is no driver, just a simple printer script that understands some -o options. Since your app does not use the lp command, there is no way to access these options.
Now all of this is to explain that changing the default settings in shared printers is not a good idea at all. The -n option in HP-UX is not a printer feature, it is a loop in the printer script that sends the job 3 times to the printer.
So to keep everything sane, change the printer(s) back to all defaults (1 copy), then create a new printer queue using the addqueue command:
addqueue -h 12.34.56.78 -q hplj3
Since you are using the same IP address as the original printer, you can now modify the printer script to default the -n option to 3. Now printing to the standard printer gives 1 copy, printing to the xxxx3 printer produces 3 copies. Just modify the xxxx3 printer script located in /etc/lp/interface/model.orig to make this queue always print 3 copies (and any other custom features you might want). Just tell your app to use a different printer name.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2004 07:12 AM
12-16-2004 07:12 AM
Re: hppi printing multiple pages
Both of you ideas worked.
although editing the file in /etc/lp/interface was a whole lot eaiser than the one in /etc/lp/interface/model.orig
I ended up using a combination of you ideas.
adding a second print queue hplj_3 and then editing the file in /etc/lp/interface changing copy=$4 to copy=3 now I just have to sell the idea to the application people.
Hopefully they wont say, but what if I want 4 copys or 5 copys etc...
Thanks Again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2004 07:20 AM
12-16-2004 07:20 AM
Re: hppi printing multiple pages
Just edit the interface scripts for your copy counts as you've done already. Now, the end user can change the copy count for the application by changing the name of the printer.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2004 07:41 AM
12-16-2004 07:41 AM
Re: hppi printing multiple pages
You can use a different queue for the same printer and let people choose the number of copies while printing to that queue (same printer).
Once you change the "copy=$4" parameter to "copy=3", you are forcing the script to print 3 copies instead of supplying the $4 parameter as an option to "-n" option with the lp command. If you use the -n option with the lp command for this printer queue, you may get an error message.
It is difficult to say whether it would still print 3 copies or the lp will just send an error and ignore the print command.
Hope this helps.
Regds