This is a discussion on Printing to HP printers on Win2K from OSR5 within the Sco Unix forums, part of the Unix Operating Systems category; --> Hello All, I have been printing to LPR printers on Windows 9x to Win2K SP2 for years, from OSR5 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello All, I have been printing to LPR printers on Windows 9x to Win2K SP2 for years, from OSR5 with no problems. Now with SP4 installed on 3 Win2K stations PCL commands print, as a few nonsense characters, on the top of the page instead of reformating the text. I'm sure this is a Win2K problem, but I can't find anything, anywhere, on it. Has anyone else run into this? Is there a know fix for this? Maybe I should bite-the-bullet and purchase wom third party Win2K software to do this? Cheers for any info. Skot. |
| ||||
| Skot wrote: > > Hello All, > > I have been printing to LPR printers on Windows 9x to Win2K SP2 for > years, from OSR5 with no problems. Now with SP4 installed on 3 Win2K > stations PCL commands print, as a few nonsense characters, on the top of > the page instead of reformating the text. I'm sure this is a Win2K > problem, but I can't find anything, anywhere, on it. Has anyone else > run into this? Is there a know fix for this? Maybe I should > bite-the-bullet and purchase wom third party Win2K software to do this? Here are my thoughts, and a workaround for Win2K lousy LPR system, just in case someone else runs into this crap (no third party, Windoze ware needed): Windows 2000 Professional SP4 LPR (Print services for UNIX) doesn't not work properly with PCL (Printer Control Language) on HP printers. It seems that Win2K somehow disables PCL when "Enable advanced printing features" is enabled. This is set in myPrinter Properties page, under the Advanced tab. However, you need this enabled to use LPR. The only way around it, that I can see, is to use SMB protocol, which may not be possible for some old legacy systems. The original file, /usr/lib/samba/bin/smbprint.sysv that I had on my OSR5.0.7 system, didn't work well (not enough '\\'s) and didn't make use of the UserID that Win2K requires if you disable Guest accounts like I tend to. So here are my modifications to the file: #!/bin/sh # # @(#) smbprint.sysv version 1.0 Ross wakelin<r.wakelin@march.co.uk> # # Version 1.0 13 January 1995 # modified from the original smbprint (bsd) script # and re-modified by Scott Taylor, on 22 January, 2004 # # this script is a System 5 printer interface script. It # uses the smbclient program to print the file to the specified # smb-based server and service. # # clear out the unwanted parameters shift;shift;shift;shift;shift # now the argument list is just the files to print server="" # Windows NMB Name service="" # Windows printer share name userid="" # Windows userid password="" # Windows Password for userid ( # NOTE You may wish to add the line `echo translate' if you want # automatic CR/LF translation when printing. # pretty much always unless you have a good old Lexmark that does it for you. echo translate echo "print -" cat $* ) | /usr/lib/samba/bin/smbclient "\\\\$server\\$service" $password -N\ -U $userid -P > /tmp/scott.test exit $? #EOF Next, adding an SMB printer pretty much works the same as SCO's TA #125213. Replacing "printer" with some useful printer ID; as root do: /usr/lib/lpadmin -p printer -v /dev/null -i /usr/lib/samba/bin/smbprint.sysv modify "/usr/spool/lp/admins/lp/interfaces/printer" file to add the server, printer, userid and password. accept printer enable printer Now the PCL commands work. Skot. |