![]() |
![]() |
| Home | What's New | Products | Download | Purchase | Support | About Us | Contact |
SUPPORT > TIPS
|
|
You may be a programmer looking for a quick and easy way to print source files directly to your local printer. Or perhaps you are developing an in-house application and want to roll out a mechanism for end users to print directly from their terminal to a desktop printer.Sometimes remote applications don't support pass-through printing or you need to modify the process in some way. A customized script, such as the Perl script example in this tip, can be an effective solution. The script notes provide you with all of the escape sequences for the emulations supported by CRT™ and SecureCRT®. The script shows you a simple example of how to use the escape sequences, which you can modify or build on to suit your particular needs. To try out this script, you'll have to select the appropriate modification for your emulation and specific needs, then decide whether to send the output to the printer, the screen, or both. Once the script is on the remote host, simply cat the file you want to print and pipe it to the script. When the script stops receiving data, it will send the output to CRT or SecureCRT, which then handles sending the file on to the selected printer (you can also print to a text file ). The script buffers all of the data, so you don't need to worry about printing one line per page. Pass-through printing is turned on by default in CRT and SecureCRT. To make sure it is turned on for a particular session, go to Session Options / Printing / Advanced. "Disable Pass-Through Printing" should be unchecked. You should also make sure that "Buffer Pass-Through Printing" is unchecked, or off, in Session Options / Printing / Advanced.Here is the sample Perl script for pass-through printing in its entirety: ptp.pl.txt (for this script to work properly, you should save the file without the .txt extension).~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Begin ptp.pl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#!/usr/bin/perl
|
|||||||||||||||||||||
| Four Fast Ways to Learn More... |
| 1. Read or download one of our secure solutions white papers. | 2. Download
a free 30-day evaluation copy of our products. |
3. Let us help define the right Secure Shell solution for your company. | 4. Subscribe to our monthly newsletter for tips, solutions ideas, and product news. |
Site Map | Legal Notices | Privacy
Policy | Refund
Policy
Copyright © 1995 -
VanDyke Software, Inc. All rights reserved.