Colin Telmer <[EMAIL PROTECTED]> writes:

[snip]

> #!/bin/sh -x
> (
> # NOTE You may wish to add the line `echo translate' if you want automatic
> # CR/LF translation when printing.
>         echo translate
>         echo "print -"
>         cat
> ) | /usr/sbin/ljet3-filter | /usr/bin/smbclient "\\\\MAIN\\HPLIII" -N -P > 
> /var/log/smb-print.log
> 
> I thought this would work perfectly, but I'm wrong as when I tried
> lpr -Prlp test.dvi
> the printer down the hall started pumping out pages with junk all over
> them. Am I missing something or is there a better correct way to do this?

[snip]

DVI files start with the bytes \367\002, which is how magicfilter
identifies them.  However, the first two bytes you send to
ljet3-filter are "tr", so it assumes you're sending plain text.  As
I've discovered myself, DVI's don't print very well this way.

Something like the following should work better.  Also, are you sure
you want to do CR/LF translation in this case?  ljet3-filter doesn't.
The "$@" passes on the options from lpd to magicfilter, as documented
at the top of magicfilter(8).

#!/bin/sh -x
(
    echo translate
    echo "print -"
    /usr/sbin/ljet3-filter "$@"
) | /usr/bin/smbclient '\\MAIN\HPLIII' -N -P > /var/log/smb-print.log

-- 
                Carey Evans  <*>  [EMAIL PROTECTED]

"Encryption renamed to Encode to avoid US regulation problems"
                     - include/linux/wireless.h in Linux 2.0.30 kernel


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to