This is a discussion on Unwanted border when printing ASCII documents within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> Hi all, I set up printing to my network printer using the method detailed in the Solaris Printing guide ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, I set up printing to my network printer using the method detailed in the Solaris Printing guide on docs.sun.com (including the step that adds the filters in /etc/lp/fd. Printing works like a charm except that when I print a plain ASCII document (say /etc/passwd) each page has a border. No matter what I try, I can't get rid of the damned border! Here are the commands I used to set up this local network printer called "optra", whose hostname is "laser1": # lpadmin -p optra -v /dev/null # lpadmin -p optra -m netstandard_foomatic # lpadmin -p optra -o dest=laser1:9100 # lpadmin -p optra -I postscript # lpadmin -p optra -n /usr/share/ppd/SUNWfoomatic/Lexmark/Lexmark-Optra_S_1250-Postscript.ppd.gz # lpadmin -p optra -D "Optra S 1255N" # cd /etc/lp/fd # for i in *.fd; do > name=`basename $i .fd` > lpfilter -f $name -F $i > done # accept optra # enable optra # lpstat -p optra printer optra idle. enabled since Sun Feb 24 16:26:29 2008. available. # lp -d optra /etc/passwd I've tried just about everything I can think of--even editing the a2ps command line in /usr/lib/lp/bin/foomatic-rip. I added the option "--borders=no" to the line that starts "my $fileconverter" and tried again, but no luck. Google shows a few people having the same problem, but no answer. Any help greatfully received; surely printing an ASCII file without a border shouldn't be this difficult! Many TIA, -- Rich Teer, SCSA, SCNA, SCSECA, OGB member CEO, My Online Home Inventory URLs: http://www.rite-group.com/rich http://www.linkedin.com/in/richteer http://www.myonlinehomeinventory.com |
| |||
| Rich Teer wrote: > Hi all, > > I set up printing to my network printer using the method detailed > in the Solaris Printing guide on docs.sun.com (including the step > that adds the filters in /etc/lp/fd. Printing works like a charm > except that when I print a plain ASCII document (say /etc/passwd) > each page has a border. No matter what I try, I can't get rid of > the damned border! > > Here are the commands I used to set up this local network printer > called "optra", whose hostname is "laser1": > > # lpadmin -p optra -v /dev/null > # lpadmin -p optra -m netstandard_foomatic > # lpadmin -p optra -o dest=laser1:9100 > # lpadmin -p optra -I postscript > # lpadmin -p optra -n /usr/share/ppd/SUNWfoomatic/Lexmark/Lexmark-Optra_S_1250-Postscript.ppd.gz > # lpadmin -p optra -D "Optra S 1255N" > # cd /etc/lp/fd > # for i in *.fd; do > > name=`basename $i .fd` > > lpfilter -f $name -F $i > > done > # accept optra > # enable optra > # lpstat -p optra > printer optra idle. enabled since Sun Feb 24 16:26:29 2008. available. > # lp -d optra /etc/passwd > > I've tried just about everything I can think of--even editing the > a2ps command line in /usr/lib/lp/bin/foomatic-rip. I added the > option "--borders=no" to the line that starts "my $fileconverter" > and tried again, but no luck. Google shows a few people having > the same problem, but no answer. > > Any help greatfully received; surely printing an ASCII file without > a border shouldn't be this difficult! > > Many TIA, > Welcome to the wonderful world of Unix printing! If the CD that came with my JetDirect card didn't have support for Solaris I'd probably STILL be trying to get it to work on S8 and S9. S10 seems to have improved support for setting up a printer. It allowed me to pick my printer model from a list a la Windoze. Neither Windoze nor VMS is as difficult, in this regard, as the typical Unix. The documentation, what there is of it, isn't very helpful! |
| |||
| On Mon, 25 Feb 2008, Rich Teer wrote: Sorry for following up to myself, but I have finally got this thing sussed, and I thought I'd record my findings here for the next poor sap who struggles with this. You're welcome. :-) Once you know it, the trick is very simple. Before running the looped lpfilter command in /etc/lp/fd, edit the "Command" line in a2ps.fd. Change it from this: Command: /usr/bin/a2ps -q -c -B -o- -1 to this: Command: /usr/bin/a2ps -q -c -B -o- -1 --borders=no (i.e., add the trailing "--borders=no"). Then add the filters as usual: > # for i in *.fd; do > > name=`basename $i .fd` > > lpfilter -f $name -F $i > > done and you're done! IF you've already run the preceding lpfilter command, edit the a2ps.fd file as described, then add the modified filter to the system: lpfilter -f a2ps -F a2ps.fd Quite why no border isn't the default is beyond me! Enjoy, -- Rich Teer, SCSA, SCNA, SCSECA, OGB member CEO, My Online Home Inventory URLs: http://www.rite-group.com/rich http://www.linkedin.com/in/richteer http://www.myonlinehomeinventory.com |
| |||
| Rich Teer wrote: > On Mon, 25 Feb 2008, Rich Teer wrote: > > Sorry for following up to myself, but I have finally got this thing > sussed, and I thought I'd record my findings here for the next poor > sap who struggles with this. You're welcome. :-) > > Once you know it, the trick is very simple. Before running the looped > lpfilter command in /etc/lp/fd, edit the "Command" line in a2ps.fd. > Change it from this: > > Command: /usr/bin/a2ps -q -c -B -o- -1 > > to this: > > Command: /usr/bin/a2ps -q -c -B -o- -1 --borders=no > > (i.e., add the trailing "--borders=no"). > > Then add the filters as usual: > >> # for i in *.fd; do >> > name=`basename $i .fd` >> > lpfilter -f $name -F $i >> > done > > and you're done! IF you've already run the preceding lpfilter command, > edit the a2ps.fd file as described, then add the modified filter to the > system: > > lpfilter -f a2ps -F a2ps.fd > > Quite why no border isn't the default is beyond me! > > Enjoy, > No trick - borders are documented in a2ps man page. |
| ||||
| On Wed, 12 Mar 2008, paul a plonsky wrote: > No trick - borders are documented in a2ps man page. True, but the trick (for me) was figuring out where a2ps was called so that I could change its incantation. -- Rich Teer, SCSA, SCNA, SCSECA, OGB member CEO, My Online Home Inventory URLs: http://www.rite-group.com/rich http://www.linkedin.com/in/richteer http://www.myonlinehomeinventory.com |
| Thread Tools | |
| Display Modes | |
|
|