Unix Technical Forum

Printing to HP printers on Win2K from OSR5

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Sco Unix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-15-2008, 12:45 PM
Skot
 
Posts: n/a
Default Printing to HP printers on Win2K from OSR5

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-15-2008, 12:47 PM
Skot
 
Posts: n/a
Default Re: Printing to HP printers on Win2K from OSR5

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:40 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com