Bug 2870

Summary: smbprint and CR/LF
Product: [Retired] Red Hat Linux Reporter: stef.pillaert
Component: sambaAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-06-25 16:13:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description stef.pillaert 1999-05-17 08:53:23 UTC
I'm trying to print from RH6.0 to a printer on a
WinNT-machine. 2 problems:
** If I remember it correctly, in former versions of the
smbprint filter, there was given a possibility to add "echo
translate", to force CRLF translation. In the
smbprint-filter under /usr/lib/rhs/rhs-printfilters/ (it is
the one used when you install the printer via printtool),
there isn't such a possibility given. However, I had to add
"echo translate" to get right prints.

** What do I have to change (in smbprint?) to print from
Ghostview? Now it seems to print it out all litterally (a
lot of garbage!)

Thanks,

Stef.

Comment 1 Bill Nottingham 1999-05-24 18:58:59 UTC
translate should be fixed in rhs-printfilters-1.53, which will
be in the next Raw Hide.
What's your problem with ghostview; what kind of printer
do you have on the NT-machine, and how do you have it set
up under Linux.

Comment 2 stef.pillaert 1999-05-25 07:47:59 UTC
The printer on the NT is a HP Laserjet 6P. I installed the printer
with the printtool in Linux (SMB printer), using the smbprint
mentioned above. Printing from Ghostview results in printing it as if
it was ASCII (though the screen shows it as it should).

Comment 3 Bill Nottingham 1999-05-25 18:12:59 UTC
By 'printing as if it was ASCII', does that mean that
you get the actual postscript source coming out of the
printer?  If so, is there any control-header at all at
the top of the postscript output?

Comment 4 stef.pillaert 1999-05-27 10:04:59 UTC
Indeed, I do get the actual postscript source comming out of the
printer. When I print from Ghostview, it suggests "lpr" as command (is
this OK.? Or should there be something added? Sorry if this a dumb
question, but I can't find any help in manuals or elsewhere...). The
top coming out of the printer looks like this:

%!PS-Adobe-2.0
%%Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software
%%Title: liboctave.dvi
%%Pages: 55
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%%DocumentPaperSizes: Letter
%%EndComments
%DVIPSCommandLine: dvips -o liboctave.ps liboctave.dvi
%DVIPSParameters: dpi=300, compressed, comments removed
%DVIPSSource:  TeX output 1998.08.18:1650
%%BeginProcSet: texc.pro
/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N

Comment 5 Bill Nottingham 1999-06-14 21:32:59 UTC
Hm. Is this fixed if you use the translate option (or, if you
are using it, if you remove it?)

Comment 6 stef.pillaert 1999-06-21 10:23:59 UTC
adding or removing "echo translate" doesn't solve the problem: it is
still ASCII coming out of the printer. I just added "echo translate"
to the smbprint file (last line), so it looks like this now:

(echo translate; echo "print -"; cat) | /usr/bin/smbclient "$share"
"$password" -E ${hostip:+-I} $hostip -
N -P $usercmd "$user" $wokrgroupcmd "$workgroup" 2>/dev/null

Comment 7 Bill Nottingham 1999-06-21 20:25:59 UTC
printing from the command line works OK, correct; it's
just ghostview that has problems?

Comment 8 stef.pillaert 1999-06-22 07:54:59 UTC
printing a ASCII file works OK ("lpr test.txt" comes out correctly,
with correct CR/LF...)
I'm not sure how to print a Postscript-file from the command line:
"gs -sOutputFile=\|lpr test.ps" (as suggested in the gs man pages)
just gives the file on my screen, page after page, and nothing is sent
to the printer.
"gs -sOutputFile=|lpr test.ps" shows a blank window on my screen,
gives a message about a broken pipe, and prints the file as if it was
an ASCII file (so, the same result as with ghostview here...)

Comment 9 Bill Nottingham 1999-06-22 17:52:59 UTC
you should just be able to do 'lpr file.ps'; or does
that not work either?

Comment 10 stef.pillaert 1999-06-23 07:43:59 UTC
"lpr file.ps" just prints the file as if it was ASCII (with or without
the "echo translate" in the smbprint file. So same result here as with
ghostview...Sorry.

Comment 11 Bill Nottingham 1999-06-23 14:40:59 UTC
what do you have the printer set up as?

Comment 12 stef.pillaert 1999-06-24 06:56:59 UTC
As mentioned before, I installed it with "printtool" as an
SMB-printer, using the "smbprint" file under
"/usr/lib/rhs/rhs-printfilters/". It still is an HP Laserjet 6P.

Comment 13 Bill Nottingham 1999-06-24 16:14:59 UTC
I'm sorry if I was confusing; in print tool, what
'Input Filter' do you have selected -
Postscript?  HP LaserJet?

Comment 14 stef.pillaert 1999-06-25 14:19:59 UTC
OOPS!!! When I installed the printer as an SMB printer, the smbprint
file was selected automatically as teh inputfilter, so I thought that
I shouldn't change that!!! Now I selected "HP Laserjet", and all works
great (just a tiny margin adjustment would make things perfect). I'm
very sorry, it seems to be silly not to have thought of that. But how
does the smbprint file comes into play then? I've always been told to
use the smbprint as the input-filter. Is it useless then, or am I
missing something here? I've been instructed to use the smbprint as
the inputfilter when installing an SMB printer. Can you clear things
up for me please?

Anyway, thanks a lot for the help, and I truly hope you haven't been
spending too much time on this one...
Stef.

Comment 15 Bill Nottingham 1999-06-25 16:13:59 UTC
The 'smbprint' part it the filter that worries about
getting the data to the printer.

The 'HP LaserJet' part is that part that worries about
what sort of data to convert it to so that the printer
understands it.