× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I've recently had a need (for work) to have TN5250 be capable of doing a
print screen without setting up lp5250d and sending the data from the
AS/400.

So, I've added this feature to TN5250 in the Windows & Curses terminals
in CVS.  Unless problems are found, it will also be included in the
next release (which will be soon) but please test it out for me so that
we know it works :)

WINDOWS:
This prints the screen to your printer using the Windows API's GDI calls,
so it works with whichever print drivers you have installed, as long as
they're capable of printing a bitmap.

I've added a Print option to the File menu.   When you click File/Print
the first time, it will ask you which printer you want using the standard
printer dialog, and then send your print screen to that printer.   The
next time you hit File/Print within the same session, it will simply
print without asking you for printer info.

I've also added a new config keyword:  +local_print_key
when this is defined, it will use this local printing style instead of
sending the print AID code to the AS/400 if you press the Ctrl-P key or
whichever key you'd otherwise use for host-side print key support.

UNIX (cursesterm):
PostScript data is generated for the screen and sent to your printer
using (by default) the lpr command.  Because of the calculations needed
to print postscript, I've added a number of config keywords:

  +local_print_key     turns the local-side print key support on.
  outputcommand=CMD    command to pipe postscript to (default: lpr)
  psfontsize_80=NUM    size in dots of font in 80 col (default: 10)
  psfontsize_132=NUM   size in dots of font in 132 col (default: 7)
  pagewidth=NUM        width in dots of page (default: 612)
  pagelength=NUM       length in dots of page (default: 792)
  leftmargin=NUM       left margin of page in dots (default: 18)
  topmargin=NUM        top margin of page in dots (default: 36)

When +local_print_key is set in your config, the Ctrl-P key (or anything
you have mapped to K_PRINT) will pipe a postscript copy of the screen to
the specified outputcommand (or lpr if none specified).   Personally, I
use Ghostscript to convert the postscript to my printer's language, but
how you handle the postscript is up to you.

Just like lp5250d, you can make your outputcommand do other things, such
as "cat - > myfile$$.ps", "ps2pdf - myfile$$.pdf", etc.  Just keep in mind
that unlike lp5250d, there is no need to use scs2ascii.   The postscript
is generated locally, the data was never in SCS format.

Have fun!


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.