Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unix to NT - deskjet

SOLVED
Go to solution
John Flanagan
Regular Advisor

Unix to NT - deskjet

As a temporary solution I want to print from my HP-UX 10.2 box to a deskjet attached to an NT PC. Is it possible to get compressed print to work doing this?

Regards,

John.
11 REPLIES
Shahul
Esteemed Contributor

Re: Unix to NT - deskjet

Hi

I don't think it is possible. Do U have an IP address assigned to that Printer? Then U can configure as a remote printer and use it. Or U use jet admin to meet ur requirement.

Best of luck
Shahul
John Flanagan
Regular Advisor

Re: Unix to NT - deskjet

I have assigned a fixed ip address to the pc and Windows is running lpd. Is it possible to tell a hp deskjet to print in a compressed font by default? (I will put that to the printing group).
Steve Steel
Honored Contributor

Re: Unix to NT - deskjet

Hi

try making the remote printer in sam without selecting the BSD option.

Then try printing with -oc

Remember the parameter must be known to the remote spooler.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
John Flanagan
Regular Advisor

Re: Unix to NT - deskjet

I have tried that before but NT's lpd server does not seem to recognise that. Would it be possible to get the spooler on the hp box to insert the control codes for font and orientation at the start of the text file?
Andreas Voss
Honored Contributor
Solution

Re: Unix to NT - deskjet

Hi,

check the lp interface script at:
/var/spool/lp/interface/

Look for the line:
/usr/sbin/rlp -I$requestid ......

Before this line you could insert ie:

{
echo "\033&k2S\c" # compressd escape sequence
cat $1
} >$1.tmp
mv $1.tmp $1

Regards
Bill Hassell
Honored Contributor

Re: Unix to NT - deskjet

Remote printers will use -o options *only* if the remote system is HP-UX. This is a feature of SysV spooling. When you go through another server (like NT), you lose the controls that are available in lp -o options. A better choice is to remove the printer from the simple NT box and connect it to an HP JetDirect External box. Now, both the NT box and HP-UX can print to it as a network printer. HP-UX and NT will both have to get the JetDirect software (HP Printer Installer).

Otherwise, I would insert the appropriate escape sequence in front of the print job (don't change the rlp scripts as it will affect every job).


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: Unix to NT - deskjet

Remote printers will use -o options *only* if the remote system is HP-UX. This is a feature of SysV spooling. When you go through another server (like NT), you lose the controls that are available in lp -o options. A better choice is to remove the printer from the simple NT box and connect it to an HP JetDirect External box. Now, both the NT box and HP-UX can print to it as a network printer. HP-UX and NT will both have to get the JetDirect software (HP Printer Installer).

Otherwise, I would insert the appropriate escape sequence in front of the print job (don't change the interface script as it will affect every job for that printer).


Bill Hassell, sysadmin
John Flanagan
Regular Advisor

Re: Unix to NT - deskjet

Andreas,

You use \033....\c for your escape sequence. I always have to use ^V Esc to insert an escape sequence. Is this something unusual on my system?

Bill,

In this case Andreas solution looks good as I want all output compressed. I would normaly use JetDirect but I have run out of print servers.

I will be able to test this solution in the morning.

Thanks,

John.
A. Daniel King_1
Super Advisor

Re: Unix to NT - deskjet

I don't know exactly the printing application, but pass through printing may be an option - if you are using a terminal/terminal emulation.

http://www.anzio.com/support/whitepapers/printguide.htm

Pass-through is a newer term for printing to dumb terminals with slave printers. It works with most terminal emulators - Anzio and SecureCRT work, but Hyperterminal does not appear to work.

For example:

$tput mc5 ; cat myfile ; tput mc4

I'm sure that there is some way to reroute the lp output to stdio in-between the tput statements ...
Command-Line Junkie
John Flanagan
Regular Advisor

Re: Unix to NT - deskjet

Thanks everyone for help. I now have a solution.

First add to interface file for the printer the following.

{
echo "^[&k2s^[&k2G" # compressd escape sequence
cat $1
} >$1.tmp
mv $1.tmp $1

where ^[ is 'Control V' followed by 'ESC'. The first command sets compressed print and the second sets LF to CR+LF

Then on the PC with the printer attached make the following registry addition

From the HKEY_LOCAL_MACHINE subtree, go to the following key:
\SYSTEM\CurrentControlSet\ServicesLPDSVC\Parameters
On the Edit menu, click Add Value. Add the following:
Value Name: SimulatePassThrough
Data Type: REG_DWORD
Data: 1

John

Re: Unix to NT - deskjet

John,
Can u clearly outline the methods/steps followed to configure the NT Printer to ur
HPUX box?I dont have Jetdirect with me???

Can u do it at the earliest

Regards
Noel
Have a great day