Operating System - HP-UX
1753760 Members
4864 Online
108799 Solutions
New Discussion юеВ

Print from HPUX to printer attached to PC

 
Anthony Villanueva
Frequent Advisor

Print from HPUX to printer attached to PC

Hi HPUX Experts :-),

Once again I need your help. I need to print from my HPUX server to a printer connected to a PC. The setup will be the PC, where the printer is attached to, will run an emulator to connect to the unix server. From the emulator output a report from an application to the local printer.

I read that this is called pass-through printing and that secure netterm is able to do this. The same with putty. I have already download putty.exe but I don't know how to set it up so I can print using it.

Can anyone please help me?

Many thanks!
Anthony
8 REPLIES 8
Roboz
Frequent Advisor

Re: Print from HPUX to printer attached to PC

Hello Antony.

According to putty's help you can do it as follos:

A lot of VT100-compatible terminals support printing under control of the remote server. PuTTY supports this feature as well, but it is turned off by default.

To enable remote-controlled printing, choose a printer from the .Printer to send ANSI printer output to. drop-down list box. This should allow you to select from all the printers you have installed drivers for on your computer. Alternatively, you can type the network name of a networked printer (for example, \\printserver\printer1) even if you haven't already installed a driver for it on your own machine.

When the remote server attempts to print some data, PuTTY will send that data to the printer raw - without translating it, attempting to format it, or doing anything else to it. It is up to you to ensure your remote server knows what type of printer it is talking to.

Since PuTTY sends data to the printer raw, it cannot offer options such as portrait versus landscape, print quality, or paper tray selection. All these things would be done by your PC printer driver (which PuTTY bypasses); if you need them done, you will have to find a way to configure your remote server to do them.

To disable remote printing again, choose .None (printing disabled). from the printer selection list. This is the default state.

I hope it helps.
Anthony Villanueva
Frequent Advisor

Re: Print from HPUX to printer attached to PC

Thanks Roboz.

I already set that up. But, how do you print a file? The command my application us is "lp -dprinter -onb"
Ivan Delany_1
Advisor

Re: Print from HPUX to printer attached to PC

The is a (bundeled I think) product called Remote Print Manager (for HP-UX). This will allow you to create a print queue that will output directly to an NT printer.
spex
Honored Contributor

Re: Print from HPUX to printer attached to PC

Hi Anthony,

Have a look at Naveej's response in this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=866355

PCS
Anthony Villanueva
Frequent Advisor

Re: Print from HPUX to printer attached to PC

Thanks everyone! Highly appreciate it!
I also found a solution from our ERP vendor and it works!

thanks again! Continue the great works!
Anthony Villanueva
Frequent Advisor

Re: Print from HPUX to printer attached to PC

Our ERP vendor, QAD, had a solution for this and I was able to print following their instructions.
Bill Hassell
Honored Contributor

Re: Print from HPUX to printer attached to PC

And just to expand on the answer, here is a simple script for putty as well as Secure NetTerm. Note that the emulation mode in Secure NetTerm must be vt220 or higher. To use the script, you might call it passprint and just specify the file to print:

passprint myfile

and myfile will be passed to the attached printer on the PC. Note that putty and Secure NetTerm (and other smart VT emulators) must be configured to point to a specific printer on the PC. All this script does is to add the escape codes before and after the print file.

#! /usr/bin/sh

if [ -r $1 ]
then
echo "/033[5i"
cat $1
echo "/033[4i"
else
echo Filename $1 must exist and be readable
fi


Bill Hassell, sysadmin
Anthony Villanueva
Frequent Advisor

Re: Print from HPUX to printer attached to PC

Great Stuff! Many thanks!