- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Converting printer model script to filter
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
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
08-27-2003 04:03 AM
08-27-2003 04:03 AM
Somebody please guide me
Thanks a lot
Bonny
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 04:09 AM
08-27-2003 04:09 AM
Re: Converting printer model script to filter
Convert the file before you send it to lp
convertfile file|lp -dxxxx
Changing printer scripts is not advised.
Anyway,what do you want to convert to what and what type of printer is it.
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 04:43 AM
08-27-2003 04:43 AM
Re: Converting printer model script to filter
The remote printer is a Laserjet printer on a Dlink print server.
Thanks
Bonny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 05:02 AM
08-27-2003 05:02 AM
Re: Converting printer model script to filter
Perhaps not a good idea to modify this scripts but if you want to try.
If you list the printer interface script you will find a line :
/usr/sbin/rlp -I$requestid $BSDC $BSDJ $BSDT $BSDi $BSD1 $BSD2 $BSD3 $BSD4 $BSDw $BSDformat $BSDh $1
try to put some lines before this line:
cat $1 |
mv /tmp/xyz $1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 05:15 AM
08-27-2003 05:15 AM
Re: Converting printer model script to filter
What I want is a filter script for this purpose.
I thought I can convert a model script into a filter script, But how?
Thanks
Bonny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 05:20 AM
08-27-2003 05:20 AM
Re: Converting printer model script to filter
Ok try this
In the model script /etc/lp/interface/printer
============================================
Change after the shift line
===========================================
shift; shift; shift; shift; shift
#### change starts here ###############
mv $1 ${file}.tmp
/usr/lbin/lprpp < ${file}.tmp > $1
##########end of change ###############
/usr/sbin/rlp -I$requestid $BSDC $BSDJ $BSDT $BSDi $BSD1 $BSD2 $BSD3
$BSD4 $BSDw $BSDformat $BSDh $1
==============================================
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 06:18 AM
08-27-2003 06:18 AM
Re: Converting printer model script to filter
A remote printer driver just dumps the file to the printer.
So this cannot become a filter.
Either change as shown or translate your file and then print it which is easiest
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 06:21 AM
08-27-2003 06:21 AM
Solution/usr/lib/lp/model/PCL5 1 $(logname) MyFile 1 "-o options" /my_file_name | lp -dremote_printer
where:
$1 = 1 = requestID (noramlly assigned by lpsched)
$2 = logname = userID submiting the job
$3 = MyFile = Title..anything you want as a title
$4 = 1 = number of copies
$5 = "-o stuff" = options
$6 = /my_file_name = file to print
NOTE: each parameter must be enclosed in " " if there are imbedded spaces. So to print /etc/profile in landscape mode:
/usr/lib/lp/model/PCL5 1 $(logname) profile 1 "-olandscape" /etc/profile | lp -dremote_printer
Now the JetDirect scripts are the only ones that are being kept up to date (/usr/lib/lp/model has 90% obsolete printers) but the more recent scripts may have JetDirect-specific code. You'll have to experiment with these scripts which are found in /opt/hpnpl/sh and remove any code that doesn't allow the script to work as a simple filter. net_ljx000 is a fairly generic script for all the new HP LaserJet models.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 06:22 AM
08-27-2003 06:22 AM
Re: Converting printer model script to filter
Thanks
Bonny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 06:24 AM
08-27-2003 06:24 AM
Re: Converting printer model script to filter
http://www.lexmark.com/US/products/networking/mvp/
should work with your printer
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 06:30 AM
08-27-2003 06:30 AM
Re: Converting printer model script to filter
...PCL5... "landscape nb" /etc/profile ...
You can add as many options as you like:
"landscape nb duplex"
and so on...
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 06:38 AM
08-27-2003 06:38 AM
Re: Converting printer model script to filter
It also has options to print plain ASCII files by odd or even pages and assumes the default font in the printer will generate 60 or 66 lines per page. lprpp is almost useless for anthing but simple text files and is leftover from the days of perforated greenbar paper printers.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2003 08:30 AM
08-27-2003 08:30 AM
Re: Converting printer model script to filter
shift; shift; shift; shift; shift
#### change starts here ###############
/usr/lib/lp/model/PCL5 $requestid $(logname) $1 1 $1 | /usr/sbin/rlp -I$requestid $BSDC $BSDJ $BSDT $BSD1 $BSD2 $BSD3 $BSD4 $BSDw $BSDformat $BSDh