The Georgia SoftWorks SSH2/Telnet Server for Windows, True Client Side Printing allows documents to be printed at locations that are easily accessible by each user. Traditionally, default printing using SSH2/Telnet is always local to the server. This can be inconvenient to the user. Georgia SoftWorks overcomes the traditional problem by providing True Client Side Printing - printing the way you want it.
Multiple (up to 9) printers may be used on a per user basis. Georgia SoftWorks offers several printing methods for the SSH2/Telnet user that will address most printing requirements. They are
• Default - Works as if the SSH2/Telnet user is sitting at the Windows server.
• Enhanced - Printer output is sent to the printers accessible by the client computer when using the Georgia SoftWorks SSH2/Telnet client. The printer is considered accessible if it is configured as one of your printers visible in the Printers Applet in the Control Panel.
• Open - allows SSH2/Telnet user to configure the printing command used when printing.
• Passthrough – allows print jobs to be redirected to RF Devices supporting escape sequence based printing.
• SAP – Allows SAP print jobs to be redirected to RF Devices (printer). See page 274 for details.
The Default Printing method uses standard server printing facilities. When a SSH2/Telnet user prints, the printer output destination is exactly the same as if the user is sitting at the server and initiated the print. The destination may be local to the server or any remote printer that has been captured by the net use command. No setup is required for Default printing.
Enhanced printing is an advanced feature of the Georgia SoftWorks SSH2/Telnet Clients that allows printers accessible to the user’s client computer to be used when printing with SSH2/Telnet. The Client computers default printer is used if no SSH2/Telnet client command line parameters are specified. The SSH2/Telnet user can override the default printer using command line arguments when initiating the client. Also multiple printers can be utilized by configuring additional client side printers as described below.
The Open printing method allows the SSH2/Telnet user to specify the printing command that SSH2/Telnet will use when processing print jobs. For example if the user wants to send output to a shared [28] printer then the "print /d" command can be configured. Another example is sending output to a printer with an IP address that is on the network but is not shared or visible to the server. In this case the SSH2/Telnet user would specify the "lpr" printing command. Other valid print commands can be configured as the user’s requirements dictate. Please be knowledgeable with the printing commands you select.
There are up to three steps in setting up True Client Side Printing .
• Defining Virtual Printer(s) on the Server - This is the same for all printing methods.In creating a Virtual Printer the key information is the Printer Name, the Share Name and the Port. Up to three (3) Virtual Printers may be defined on the server. (This will allow up to three (3) printers to be used for each client.). A Printer Index is used to identify and correlate the various printer setups. The printer indexes are 1, 2 and 3. For the Virtual Printer Setup the Printer Name and Share Name require printer indexes. The following setup is for an individual printer (Printer Index 1).
1. Click the Start button at the bottom left corner of your screen.Now your virtual printer is created and is ready for use bySSH2/Telnet . However you must be sure to set the redirection commands in logon scripts.
If you need to support more than one client side printer per user at a time then repeat steps 1 through 11 using the other two Printer Indexes. This involves replacing the printer name in step 8 with GwtnPrinter2, GwtnPrinter3, GwtnPrinter4, GwtnPrinter5, GwtnPrinter6, GwtnPrinter7, GwtnPrinter8 or GwtnPrinter9 and the share name in step 9 with GwtnPrinterShare2, GwtnPrinterShare3, GwtnPrinterShare4, GwthPrinterShare5, GwtnPrinterShare6, GwthPrinterShare7, GwtnPrinterShare8, or GwthPrinterShare9.
For each user that is using the Georgia SoftWorks True Client Side Printing redirection commands must be added to their logon script. First the Virtual Printer must be associated with the printer device that the user wants to use. This is the device that the application will select when printing. This can be accomplished with the "net use" command. It is of the form:
net use lptx: \\servercomputername\GwtnPrinterSharey
Where
• lptx is the printer port that the application sends the printer output (typically lpt1 for Dos applications)
• \\servercomputername\GwtnPrinterSharey is the specification for the virtual printer. The printer share would be either GwtnPrinterShare1, GwtnPrinterShare2, GwtnPrinterShare3 etc.
The next is an environment variable that indicates the True Client Side Printing method chosen. The environment variable is:
GWTN_LOCAL_PRINT_METHOD
and valid values are:
• Open
• Enhanced
The syntax is:
set GWTN_LOCAL_PRINT_METHOD=Open or
set GWTN_LOCAL_PRINT_METHOD=Enhanced
If the environment variable does not exist then the True Client printing method is the Default printing method. This prints as if the user is sitting local at the server. There is no setup required for the Default printing method.
The Open print method allows the administrator to determine the print command used by SSH2/Telnet when printing. There are unlimited applications for this printing method. Common uses involve printing to shared or network printers.
The Enhanced print method allows any printers accessible to the client system (for example the default printer) to be easily used by SSH2/Telnet. A common use for Enhanced printing is when connecting to the server across the Internet or via RAS.
The Enhanced Print Method is very useful to users that connect across the Internet or via RAS.
Enhanced printing may also be used in many other scenarios. The Enhanced True Client Side Printing Method is a feature of the Georgia SoftWorks SSH2/Telnet Clients and is not available with 3rd party clients. Print output is sent to the client’s computer default or local printer(s). Client parameters also exist that allow printers other than the default printer to be used with Enhanced printing.
Note: It is required that each user be logged in only once for the Enhanced Print method to operate correctly. That means that each workstation/RF device must use a different User Id when connecting to the server.
The first example describes the basic Enhanced Printing setup and the second example describes using multiple client side printers and the third describes the override feature.
I have sales people that SSH2/Telnet to the server to get reports from a variety of locations. They carry laptops with portable printers and SSH2/Telnet to the server either through the Internet or via RAS. They need to get customer and shipping information printed. The sales application software that they use prints to lpt3. How do they have printer output sent to their laptop portable printers?
This is an excellent opportunity for the Georgia SoftWorks Enhanced True Client Printing Method.
---------
Figure 117: True Client Side Printing: Printing across the Internet or RAS
Note: The Logon Scripts can be implemented in a variety of ways depending on the requirements. For example a global logon script could be created for all telnet users. In the example above we used user specific scripts for each salesperson that might use telnet.
User Name(s): SuperSalesMan and SuperSalesWoman
Server Computer Name: soloman
Telnet Client: Georgia SoftWorks SSH2/Telnet Client
Client Operating System: Windows 95/98, Windows
The only requirement is that the Georgia SoftWorks SSH2/Telnet Client must being used. Of course the Virtual printer must be defined as described in the Virtual Printer section. The logon script for each user needs to have the following commands:
Edit the users logon script k_start.bat and add the following commands:
net use lpt3: \\soloman\GwtnPrinterShare1
set GWTN_LOCAL_PRINT_METHOD=Enhanced
NOTE: The above commands must appear in the logon script. It is not sufficient to set these at the command prompt or in another batch file.
The portable printer must be connected to the laptop and be the default printer for that system. It is recommended that the printer driver for the default printer be set to Generic/Text.
When the salesman prints to lpt3 the output will appear on the default printer connected to the salesman's client computer. This same methodology is used for either a individual or multiple sales people. If the client needs to support more than one printer at a time please read the section on Multiple Client Side Printers - Carefully.
Setting: remote Physicians office. They have a dot matrix printer that is used for insurance forms and a laser printer for formal letters. The medical software application exists at the main office on a Windows server and they are using SSH2/Telnet to access the application. Here an office manager in a physician’s office needs to be able to access two different printers from his client machine. The Medical application is using LPT1 to print the forms and LPT2 for the formal letters.
The main office configured the server machine to have two virtual printers. One is named GwtnPrinter1 and the other is named GwtnPrinter2 (As required by the virtual printer specifications. (See page 198)).
Figure 118: True Client Side Printing: Using Multiple Client Side Printers per User
Note the correlation between client side command line parameters “/rx” and the Printer Share and Printer names on the server.
Server Computer Name: Medical
Telnet Client: Georgia SoftWorks Telnet Client
Client Operating System: Windows 95/98 or Windows
Dot Matrix Printer Name: InsurancePrinter
Laser Printer Name: FormalPrinter
Virtual Printer to Use: 1 and 2
On the server in the users logon script add the following commands:
net use lpt1: \\MedServer\GwtnPrinterShare1
"net use lpt2: \\MedServer\GwtnPrinterShare2
set GWTN_LOCAL_PRINT_METHOD=Enhanced
NOTE: The above commands must appear in the logon script. It is not sufficient to set these at the command prompt or in another batch file.
Initiate the Client session as:
gs_clnt.exe /r1=InsurancePrinter /r2=FormalPrinter /H300
Note: The name of the SSH2 client is gs_ssh.exe.
This is a variation of the previous examples. Here the salesman has access to a color printer. Our salesmen carry laptops (running Windows 95/98) with portable printers and they SSH2/Telnet to the server either through the Internet or via RAS. They need to get customer and shipping information printed. The sales program that they use prints to lpt3. A salesman is at the customer's office and wants to get a color printout of a sales report. The customer has a color printer handy. They connect the color printer and install the proper driver. It is not the default printer. How can the salesman print to the non-default color printer?
This is an excellent opportunity for the Georgia SoftWorks Enhanced True Client Printing Method with client override. A command line parameter when initiating the Georgia SoftWorks SSH2/Telnet client allows printers other than the default printer to be used.
The Parameter is:
On Windows 95/98
/rx=printername or
/rx=\\computername\printersharename or
/rx=lpty:
/rx=comy:
On Windows
/rx=\\computername\printersharename or
/rx=lpty:
/rx=comy:
Where x is (1,2,3,4,5,6,7,8,9) the Printer Index number and
Where y is (1,2,3,4) the com port or lpt port number.
User Name: SuperSalesMan
Server Computer Name: soloman
Telnet Client: GSW SSH2/Telnet Client for Windows
Client Operating System: Windows 95/98
Color Printer Name: CustomerColorPrinter
Virtual Printer to Use: 1
The only requirement is that the Georgia SoftWorks SSH2/Telnet for Windows client is being used. Of course the Virtual printer must be defined as described in the Virtual Printer section. The logon script for user SuperSalesMan needs to have the commands described below. Edit the users logon script k_start.bat and add the following commands:
net use lpt3: \\soloman\GwtnPrinterShare1
set GWTN_LOCAL_PRINT_METHOD=Enhanced
NOTE: The above commands must appear in the logon script. It is not sufficient to set these neither at the command prompt nor in another batch file. Initiate the Client session as:
gs_clnt.exe /r1=CustomerColorPrinter /H300
When the salesman prints to lpt3 for user SuperSalesMan the output will appear on the color printer.
The Open Print Method is extremely powerful allowing the user to configure any valid printing command to be used when printing via SSH2/Telnet.
NOTE: It is required that each user be logged in only once for Open Print method to operate correctly. This means that each workstation/RF device must use a different User Id when connecting to the server.
The printing command and other parameters are configured by setting the print command environment variable. The environment variables are:
GWTN_LOCAL_PRINT_CMD1
GWTN_LOCAL_PRINT_CMD2
GWTN_LOCAL_PRINT_CMD3
…
GWTN_LOCAL_PRINT_CMD9
They correspond to the handling of print jobs sent to GwtnPrinter1, GwtnPrinter2, GwtnPrinter3 … GwtnPrinter9
And the syntax of the command is:
set GWTN_LOCAL_PRINT_CMDx=PrintCommand %s
Where
• PrintCommand is any valid printing command and argumentsThe print method and capture is determined by setting the environment variable GWTN_LOCAL_PRINT_CMDx. The most commons commands are the "print /d:" or the "lpr" printing commands. Other printing commands may be used, as the user’s needs dictate. If the client printer is a shared printer (that is visible from the server) then you should use the "print /d:" command. The lpr command should be used when the host provides an lpd service. The user should be knowledgeable of the print command selected. The syntax of the “print /d:” command could be:
set GWTN_LOCAL_PRINT_CMDx=print /d:\\clientcomputername\sharename %s
Note: the %s is typed exactly as it appears. Do not replace the %s with a file name. The system replaces the %s with the current NT-generated spool file as you print to your printing port. Note: You are not printing to that temporary file from your application - the system does this behind the scenes. Enhanced and Open printing methods allow you to print to the printer port as you normally would.
Where
• \\clientcomputername\sharename is the network path to the destination printer.
• %s is the Georgia SoftWorks file placeholder
The syntax of the lpr print command could be:
set GWTN_LOCAL_PRINT_CMDx=lpr -S Server -P printer %s
where
• Server is the name or ip address of the host providing the lpd service
• Printer is the name of the printer queue
• x is the printer index
Other arguments are available for the lpr command. Please see the help for the lpd service that you are using.
In my office I have a computer and a printer connected. I also am using a 3rd party SSH2/Telnet client. My system is on the network and my shared printer is visible to the server. I use SSH2/Telnet to connect to the company server and I run accounting applications. The accounting application uses LPT1 as the printer port. How can I use the printer in my office when I print from the accounting applications?
User Name: Smarts
Client Computer Name: SmartsComputer
PrinterShareName: SmartsPrinter
Server Computer Name: soloman
SSH2/Telnet Client: Any - No Restriction
Operating System: Any - No Restriction
The only requirement is that the printer be visible to the server. In other words the printer at the client computer must be shared. Of course the Virtual printer must be defined as described in the Virtual Printer section. The logon script for user Smarts should have the following commands:
Edit the users logon script k_start.bat. and add the following commands:
net use lpt1: \\soloman\GwtnPrinterShare1
set GWTN_LOCAL_PRINT_METHOD=Open
set GWTN_LOCAL_PRINT_CMD1=print /d:\\SmartsComputer\SmartsPrinter %s
NOTE: The above commands must appear in the logon script. It is not sufficient to set these at the command prompt or in another batch file.
When the accounting application prints to lpt1 the output will appear on the printer in Ms. Smart's office. This same methodology can be used for as many users as you wish.
In our building we have a two workgroups. Each workgroup has their network printer in a common area. Both workgroups have 25 users that SSH2/Telnet to the main server from UNIX workstations and run a database application. We print reports on lpt2. How can we get the reports to be printed on the correct network printer for each workgroup? This is an excellent case for the Open True Client Side Printing method using the lpr command
Figure 120: True Client Side Printing: Open Print MethodIP Address of the first Host providing the lpd service: 192.32.200.200
Printer Name: WrkGrpPtr1
IP Address of the second Host providing the lpd service: 192.32.200.201
Printer Name: WrkGrpPtr2
Server Computer Name: soloman
Telnet/SSH2 Client: Any - No Restriction
Operating System: Any - No Restriction
The only requirement is that an lpd service exists for the printer to be used. In this case the network printer provides the service. Of course the Virtual printer must be defined as described in the Virtual Printer section. The logon script k_start.bat for users in workgroup 1 need to have the following commands:net use lpt2: \\soloman\GwtnPrinterShare2
Set GWTN_LOCAL_PRINT_METHOD=Open
set GWTN_LOCAL_PRINT_CMD2=lpr -S 192.32.200.200 -P WkgGrpPtr1 %s
The logon script k_start.bat for users in workgroup 2 need to have the following commands:
net use lpt2: \\soloman\GwtnPrinterShare2
Set GWTN_LOCAL_PRINT_METHOD=Open
set GWTN_LOCAL_PRINT_CMD2=lpr -S 192.32.200.201 -P WkgGrpPtr2 %s
NOTE: The above commands must appear in the logon script. It is not sufficient to set these at the command prompt or in another batch file.
When the database application prints to lpt2 the output will appear on the correct network printer for each workgroup. The logon script for each user in the Work Group will need to be modified to contain the same commands. This same methodology can be used for as many users as you wish.
Pass-through printing is available for 3rd Party Clients that support Pass-through printing. An example of a 3rd Party SSH2/Telnet client that supports Pass-through printing is AlphaCommunicator. Most 3rd party telnet clients for RF terminals also support Pass-through printing making the Georgia SoftWorks SSH2/Telnet Server for Windows the ONLY SSH2/Telnet server that can accommodate Pass-through printing.
Note: It is required that each user be logged in only once for the Pass-through Print method to operate correctly. This means that each workstation/RF device must use a different User Id when connecting to the server.
Interested in printing to portable printers when in SAPConsole? See page 274
The required Georgia SoftWorks SSH2/Telnet Server setup for Pass-through printing is exactly the same as the Enhanced Print Method (page 197) with the following differences.
• There is no client parameter setupOther than that the setup for Pass-through printing is identical.
NOTE: Some third party SSH2/Telnet client [31]s exhibit printing problems when a form feed is sent at the end of the print job. The problems may manifest by simply not printing and/or the form feed being converted to NULLs. If you are experiencing this problem you can use the following environment variable for controlling the trailing form feeds at the end of a print job when using Pass-through printing.
The environment variable for the enabling or disabling the trailing form feed in Pass-through printing is: gwtn_ff_in_passthrough
For example to disable the trailing form feed you would enter:
set gwtn_ff_in_passthrough=n
in the Logon Script for a particular user.
To enable trailing form feeds in Pass-through printing you would set the environment variable to y or simply not include the environment variable in the logon script as trailing form feeds are enabled by default.
NOTE: No spaces are allowed when setting environment variables.
For example:
set gwtn_ff_in_passthrough=y is correct
set gwtn_ff_in_passthrough = y is not correct
The GWTN_PP_PRINT_BUFFER_SIZE environment variable can be used to eliminate the condition where the user must hit multiple times for a print job to complete due to some clients prompting the user after each data block is received rather than just printing the data.
The environment variable for specifying the Print Data Buffer Size for passthrough printing is:
gwtn_pp_print_buffer_size
The default print data block (buffer) size is 500 bytes.
For example, to specify a Print Data Buffer Size of 2000 bytes you would enter:
set gwtn_pp_print_buffer_size=2000
in the Logon Script for a particular user.
NOTE: No spaces are allowed when setting environment variables.
For example:
set gwtn_pp_print_buffer_size=2000 is correct
set gwtn_pp_print_buffer_size = 2000 is not correct