Printing text and graphics to a Samba Epson Stylus 400

Printing text and graphics to a Samba Epson Stylus 400

Post by Sean Cod » Sun, 31 Dec 1899 09:00:00



I cannot seem to figure out how to print from my linux box to my printer
(which is on another machine that's running windows 95).  I tried using the
info supplied in smb's howto but that didn't work at all.

If I use smbclient I can print text but that's about it.. (and I don't want
to have to go through smbclient by hand every time I want to print
something in Netscape or WordPerfect).

I have a an: Epson Stylus Color 400 on //mywinbox/epson

This printer problem is what is keeping me from exclusivly running linux on
my development machine though to print things out I currently have to
switch to a windows box.

Arg any help?/

------------------  Posted via CNET Linux Help  ------------------
                    http://www.searchlinux.com

 
 
 

Printing text and graphics to a Samba Epson Stylus 400

Post by a_do.. » Sun, 31 Dec 1899 09:00:00


Hello.
Frankly saying, information you've given is not enough at all.
Try reading printing-howto and smb-howto in /usr/doc/howto - it realy
can help! ;-)  Well, now how it works for me:

donda:/etc$ cat printcap
# /etc/printcap: printer capability database. See printcap(5).
# You can use the filter entries df, tf, cf, gf etc. for
# your own filters. See /etc/filter.ps, /etc/filter.pcl and
# the printcap(5) manual page for further details.

# remote printer on WinNT box - just what you need
lp|ljp|HP LaserJet 6p:\
        :lp=/dev/null:\
        :sd=/var/spool/lpd/ljp:\
        :sh:\
        :if=/usr/local/sbin/laserif:

donda:/usr/local/sbin$ cat laserif
#!/bin/sh
/usr/local/sbin/converter | /usr/bin/smbclient \\\\NTserver\\HPLaserJ
-i78 -P -U valid_user%his_password -c 'printmode graphics;print -'

donda:/usr/local/sbin$ cat converter
#!/bin/sh

read first_line
first_two_chars=`expr "$first_line" : '\(..\)'`
if [ "$first_two_chars" = "%!" ]; then
  /usr/bin/gs -r600 -dSAFER -dNOPAUSE -q -sDEVICE=lj5mono -sOutputFile=-
-sPAPERSIZE=a4 - && exit 0
else
  echo $first_line > /var/spool/tmp/killme && cat >>
/var/spool/tmp/killme && /usr/bin/a2gs -p -N /var/spool/tmp/killme |
/usr/local/sbin/converter && exit 0
fi
exit 2

There should be a way of arranging converter and laserif in a single
script and making converter work more efficient, but I'm too lazy to
change what's working fine for me ;-)



Quote:> I cannot seem to figure out how to print from my linux box to my
printer
> (which is on another machine that's running windows 95).  I tried
using the
> info supplied in smb's howto but that didn't work at all.

> If I use smbclient I can print text but that's about it.. (and I don't
want
> to have to go through smbclient by hand every time I want to print
> something in Netscape or WordPerfect).

> I have a an: Epson Stylus Color 400 on //mywinbox/epson

> This printer problem is what is keeping me from exclusivly running
linux on
> my development machine though to print things out I currently have to
> switch to a windows box.

> Arg any help?/

> ------------------  Posted via CNET Linux Help  ------------------
>                     http://www.searchlinux.com

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Printing with an Epson Stylus Color 400

I am posting this as Caldera support have said that they are beaten.
Many apologies for the length of the posting, but I thought you would
like as much info as possible right from the start.

I have Caldera OpenLinux 1.1 installed, with the KDE desktop.

The printer is installed according to the recommendations at:

http://www.caldera.com/support/techguide/styluscolor.html

This means that GhostScript 5.10 is installed, and that lpr is supposed
to use the following filter which I have in /var/spool/lpd/ps/filter:

#!/bin/sh

UPP=stc
PAPERSIZE=a4

if [ "$PAPERSIZE" = "a4" ]; then
    T=A4
else
    T=US
fi

if [ -x /usr/bin/nenscript ]; then
    nenscript -T$T -ZB -p-
else
    if [ "$T" = "US" ]; then
        T="Letter"
    fi
    enscript -M $T -Z -p -
fi |
        exec 3>&1 1>&2

exit 0

/etc/printcap says:

##PRINTTOOL## LOCAL stcolor 720x720 a4 {}
ps:\
    :sd=/var/spool/lpd/ps:\
    :mx#0:\
    :lp=/dev/lp1:\
    :if=/var/spool/lpd/ps/filter:\
    :sh:
##PRINTTOOL## LOCAL
lp:\
:sd=/var/spool/lpd/lp:\
:mx#0:\
:lp=/dev/lp1:\
:sh:

If I call nenscript on a text file and direct the output to a file, it
produces a PostScript file i.e.

nenscript -TA4 -ZB -pprintcap.ps /etc/printcap

works OK.

If I now call GhostScript on the PostScript file


It prints the file OK.  (Well it omits the first 3 lines actually, but
at least what it does print is correct - Courier 10 etc).  Similarly if
I use the same command on any of the GhostScript example files (e.g.
tiger.ps), they print just fine.

However, if I try to use lpr to print any kind of file I get no output
at all.  lpr goes to the filter OK (i.e. I can add a command to the
start of filter like `echo "In filter"` and it prints it (to the printer
- so presumably stdout is to the printer -- inherited from lpr??).  It
also prints the GS> prompt.

If I put the "echo" command in the "if" statement, it does not print (or
in the else) - presumably it gets lost in the pipe somewhere.

If anyone can help I will be eternally grateful and possibly for longer.

Regards

Peter

2. Keyboard shortcut

3. ghostscript printing of files to Epson Stylus Colour 400

4. Will a Zoltrix External Modem Work with RH5.2????

5. Printing on an Epson Stylus 400

6. Getting rid of XConsole

7. Epson Stylus Color 400 Problems

8. newbie leased line question

9. Epson Stylus 400/ WP8

10. EPSON Stylus Color 400 Drivers

11. Epson Stylus 400 and gs5.10 stc.upp driver

12. Epson Stylus 400 question

13. Printer Problem: Epson Colour Stylus 400