Unix Technical Forum

Unwanted border when printing ASCII documents

This is a discussion on Unwanted border when printing ASCII documents within the comp.unix.solaris 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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 03:31 AM
Rich Teer
 
Posts: n/a
Default Unwanted border when printing ASCII documents

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 03:31 AM
Richard B. Gilbert
 
Posts: n/a
Default Re: Unwanted border when printing ASCII documents

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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 09:14 AM
Rich Teer
 
Posts: n/a
Default Re: Unwanted border when printing ASCII documents

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-17-2008, 07:03 AM
paul a plonsky
 
Posts: n/a
Default Re: Unwanted border when printing ASCII documents

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-17-2008, 07:03 AM
Rich Teer
 
Posts: n/a
Default Re: Unwanted border when printing ASCII documents

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com