1753277 Members
4731 Online
108792 Solutions
New Discussion юеВ

Printing to a PC unit

 
SOLVED
Go to solution
Otto Folprecht
Advisor

Printing to a PC unit

We have a ERP software solution that runs on our UNIX system. Since we have de-centralized our sales office and the sales reps work from home there is a demand for printing UNIX reports on there home printers that are MS based. Any suggestions and solutions that we should consider as we will have over a 100 printers defined? THX Otto
11 REPLIES 11
Bill Hassell
Honored Contributor

Re: Printing to a PC unit

Since the printers are only known to these local PCs, the options are extremely limited. One solution is to copy the screens to their printer. Don't even think about opening firewalls and home routers to allow printer sharing. If the reports are plain ASCII, then pass-through printing is a good option. If gthe reports have fancy fonts and graphics, most of the printouts will not work because there are so many printer languages and layout differences--even within the HP product line.

For passthrough printing, you'll need to use a smart terminal emulator such as WRQ's Reflection for Unix (not Reflection/X). Then create a new report writer that sends the plain ASCII reports to the passthrough feature (just escape sequences). If your ERP application doesn't have an character mode interface, this will be a problem.

Note also that about the only common feature in home printers is that they print on paper. Things like font pitch and point size, characters per line, lines per page, printable margins, etc all come into the design.

So your only practical solution is a web page for reports so that the local user's printer driver will handle the formatting. Naturally, a 500 page report may be a bit tricky to put into a web page interface, but it's a simple matter of programming. ;-)


Bill Hassell, sysadmin
Naveej.K.A
Honored Contributor
Solution

Re: Printing to a PC unit

Hi,

You can do this in one way..if you are login to the hpux box from the win2k/win98 pc. For this you should have a third party telnet application like secureCRT, netterm, etc.

creat a file called localprn with the following contents in the HPUX server (/usr/bin/localprn)
echo "\033[5i"
cat $*
echo "\033[4i"

Give execute permissions.

and then you say localprn file name the print request will be redirected to your local pc. For this the normal telnet application available in win2k pro /win 98 will not work.

Configure the printer with the terminal emulation software and it prints.

Atleast it works for me!!!

with best wishes
naveej
practice makes a man perfect!!!
T G Manikandan
Honored Contributor

Re: Printing to a PC unit

RPM(Remote Print Manager) software is developed various vendors

you can search google for "RPM Windows to UNIX" and check for the tools.
you can install them on PCs and queue your unix jobs.

check out..
Bill Hassell
Honored Contributor

Re: Printing to a PC unit

As Naveej suggested, you can surround the report with escape sequences to perform pass-through printing. The codes:

echo "\033[5i"
...
echo "\033[4i"

are actually specific to DEC VT-series terminals (the most common terminal emulation) but certainly not the only one. Rather than use hardcoded sequences, it is better to use codes that are appropriate for the terminal being used. To do this, the Curses library was developed and a database of hundreds of terminal models was created called terminfo (/usr/lib/terminfo). To make scripting a lot easier, there is a terminal-specific interface to these features called tput and for pass-through printing, the code would look like this:

echo "$(tput mc5)\c"
...
echo "$(tput mc4)\c"

In this way, the escape codes will be tailored to the terminal type. Note that HP terminals have a more complicated handshake. After sending the mc4 string, HP terminals will respond with S (success) or F (fail). This is used to verify that there is a printer attached. For VT-series (and Wyse, AnnArbor, Televideo, etc) the pass-through sequence is the simple mc5/mc4 pair as above.


Bill Hassell, sysadmin
Rick Garland
Honored Contributor

Re: Printing to a PC unit

Have a look at running VNC sessions for the home users.

Bring up a browser to view the work and since the browser is local to the PC, can print the local display from the PC.

Dimo
New Member

Re: Printing to a PC unit

One solutions might be to install a product like NIPrint on the Windows PC as a local queue and setup a remote queue on the Unix server, pointing to that Windows queue.
Works well over WAN

http://www.networkinstruments.com/

Dimo
Oguz Kutlu  Asik
Honored Contributor

Re: Printing to a PC unit

I had a customer using samba to achieve that.
What's right is right, whether or not God exists
Devender Khatana
Honored Contributor

Re: Printing to a PC unit

Hi,

It can be acived through Novell's iprint services as well.

HTH,
Devender
Impossible itself mentions "I m possible"
C. Beerse_1
Regular Advisor

Re: Printing to a PC unit

If the problem is 'how to print to M$Windows based printer spoolers': M$Windows has (wel M$W 2000 has) a windows component "print services for unix" (in "other Network file and print services").

If the problem is 'how to setup this to many clients', and you happen to have Citrix or something available as well: define in there a printer that uses the destkop printer and print to that.

In the middle: have the unix system print to 'pdf'-file to a known location and let them print that.
make everything as simple as possible, not simpler (A.Einstein??)