• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

Printing to a Windows Print Share (HP LaserJet IIP) from Linux?

Nighthawk69

Golden Member
Oct 10, 2000
1,113
0
0
Hi there...

I have been trying to get my Linux Red Hat 7.3 box to print directly to my Windows 2000 Pro box that has an HP LaserJet IIP shared on it over the LAN. I have been able to get the printer setup on my Linux box and it sees it, although when I print to the Windows shared printer it just prints out garbled junk. I have tried all of the HP LaserJet IIP drivers that come with Red Hat and none seem to fix this issue. The way I have been working around this has been to simply save my documents in OpenOffice to my server, then go to that machine with the LaserJet, open the document and print it on there. Although, this can be a hassle. Does anyone have an recommendations on fixing this or working around it?

Thanks! :D
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
sounds like a task for SAMBA!

Samba is program that allows Linux to interact with windows networking stuff (file sharing, printer server), however It does require you to do some configuration stuff by hand....

Traditionally one of the major downsides of Unix's is using printer. Once apon a time every Unix distrubution had it's own version of printing software, it became to much a pain in the butt for printer companies to support Unix and since unix was used mainly on servers it wasn't that big of deal. Now that linux is making major inroads into the desktop market people are seeing to it that Unix's are developing mature printer support, but it is still not to polished.

Go to here for detailed info on SAMBA

If you are lucky Redhat 7.3 may be already set up to handle all this stuff and have a nice GUI interface, but I am not familar with Redhat's particulars....
(goto their website...)

good luck.
 

Nighthawk69

Golden Member
Oct 10, 2000
1,113
0
0
Thanks to you both.

Yes, RH does have a GUI (printconf-gui) and I am setup according to the manual you pointed to [b[manly[/b]. Still, all I get out of the LaserJet IIP on the Windows share is code from the document.... just junk really... the top includes information about the author, program used, user, etc, then the rest is simply document code.

I've tried every option for the generic postscript printer, raw printer, and all HP LaserJet IIP drivers and options and I still get the same thing. Very weird.
 

manly

Lifer
Jan 25, 2000
13,293
4,065
136
Is the generated code Postscript instructions? You can sorta determine that from the initial headers.

I'm a little perplexed from the SMB printing document I linked to because I didn't see any mention of Ghostscript filters, particularly in the screenshots. Granted, I don't understand the underlying mechanics of SMB printing that well, but at least on SuSE, you choose not only the remote shared SMB printer, but also a printer type so that Ghostscript can convert the application-generated Postscript into something meaningful to the printer. At least I assume that's how it works; I don't see how sending an SMB-shared PCL LaserJet Postscript does any good.

This document should shed some light on the situation.
 

Nighthawk69

Golden Member
Oct 10, 2000
1,113
0
0
Yeah, that's the document I was working with. It says to try try the postscript printer and the raw printer drivers, which I tried with pretty much all options, as well as all LaserJet IIP drivers that the distro has and I still get headers and code printed out. Some of the printouts say "PS-Adobe" on the top of the headers and a couple of the other printouts I have were just seemingly random numbers and letters that convered an entire page. I'm at a loss....

Anymore ideas?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
It might be a long shot but you could put the printer on you linux machine and use a CUPS server. The Cups stuff workec realy good on my computer with a ancient hp bubblejet printer.

Cups is a effort to make a print server internet protocol. You could print from a computer in china and have the output to you printer at home. The quality wa pretty good for a POS printer.

The only problem is that the info on setting it up for a windows client machine is pretty thin.

It is something like:
install and configure CUPS daemon,
Install and configure SAMBA daemon,
settup CUPS to interact with a smb (samba) daemon.
configure your windows to use the generic postscript printer....

(i got that last bit from here)
but I donno about that stuff to much....
 

Nighthawk69

Golden Member
Oct 10, 2000
1,113
0
0
Hmm, sounds interesting. Although, I already have a printer that I need to stay on my local Unix puter that works find printing from Unix (EPSON Stylus Color 600).

Any other ideas before I give up and go back to saving stuff to the server and then manually opening it on the Windows box and printing it from there...?

Thanks! :)
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
try going to the lowest common denominator. Set it up as a raw printer, and then use LPR to send a postcript file to it

lpr -P printername filename.ps

It's possible that the windows driver is corrupting the printstream. Try changing that driver to a generic one, and see if you can print OK.

I print fine from my RH system to a win2k system with a lexmark laser printer (postscript). However the Epson 1270 doesn't work (same symptoms as yours) but I haven't tried to figure it out.
 

manly

Lifer
Jan 25, 2000
13,293
4,065
136
Some manual troubleshooting to establish a baseline:
Test without using the printing system.

You can test the correctness of the entered data with the following command, which is to be entered in a single line:

echo -en "" | smbclient "//HOST/SHARE" "PASSWORD" -c 'print -' -N -U "USER" &&
echo "OK" || echo "ERROR"

Replace HOST with the host name of the Samba server, SHARE with the name of the remote queue, PASSWORD with the correct password, and USER with the user name. This is merely a test and you will not really print. Just search for OK or ERROR in the output.

If the test has been successful, you will be able to print the word Hello with the command:

echo -en "\rHello\r\f" | smbclient "//HOST/SHARE" "PASSWORD" -c 'print -' -N -U "USER"
 

Nighthawk69

Golden Member
Oct 10, 2000
1,113
0
0
Interesting. I got an OK from the first lines, then tried to print and it worked as stated: printed out "Hello" on a piece of paper on the remote LaserJet. Not sure what this means, but maybe we're onto something...?
 

manly

Lifer
Jan 25, 2000
13,293
4,065
136
Originally posted by: Nighthawk69
Interesting. I got an OK from the first lines, then tried to print and it worked as stated: printed out "Hello" on a piece of paper on the remote LaserJet. Not sure what this means, but maybe we're onto something...?
That establishes a baseline that you can print to a remote SMB printer (ASCII only).

So in other words, the problem is you need to correctly configure a local (client) print filter, and you should be okay. Worse case scenario, if the GUI just won't do the job, you can hack around the text configuration files manually. However, you would need a good understanding of the printing system configuration, as it is implemented by Red Hat Linux.

Besides /etc/printcap which more or less lists only the printer queues, I don't think end-to-end printing configuration is standard across Linux operating systems.

In short, I still believe that you do need Ghostscript to transform application-generated Postscript into PCL instructions before sending it to the remote printer. Red Hat's documentation suggests a "raw" queue should work, but it really doesn't seem to apply to your specific case.
 

Nighthawk69

Golden Member
Oct 10, 2000
1,113
0
0
OK, I just got through another round of printer driver options tests. I pretty much just get junk again except for this one setting: In OpenOffice, if I tell it to use "Postscript Level 1" in the printer settings it will print what I type, but it's all fuzzy and blurred and resenbles text on an ink-jet printer when the cartridge is almost empty. When I printed that ASCII test, it looks PERFECT on the Laser. This was with the gimp-print driver selected and "Pre-Render Postscript" to OFF and "Convert Text to Postscript" OFF. With their of those on, the printer has an error and doesn't think I am giving it the correct paper type.

Not sure what else to try...
 

manly

Lifer
Jan 25, 2000
13,293
4,065
136
SuSE Linux 8.0 works just fine. :D

I haven't bothered to setup a remote inkjet printer yet though (my Winblows box shares both a LaserJet and a DeskJet).
 

Nighthawk69

Golden Member
Oct 10, 2000
1,113
0
0
hehe, sounds good :) I don't print on the Laser too often personally, but I'm getting my younger sister off on the right foot with a puter I'm building up for her and loading Linux on there and I wanted her to be able to print on the Laser without much hassle. I guess she'll just have to learn to save to the server and print if manually from the Win2k box... ;)