VISTA Printing Printer Subtypes

From VistApedia
Revision as of 18:17, 20 September 2016 by Shabiel (talk | contribs)
Jump to: navigation, search

VISTA Subtypes

A subtype (stored in file #3.2 TERMINAL TYPE) is an entry associated with each device that tells the device how to handle special non-standard situations; plus some base characteristics. With printers, typically a subtype has two fields populated: Open Execute and Close Execute, in addition to Right Margin, Form Feed, Page Length, and Back Space. The Open Execute resets the printer, sets the page orientation, sets the top and left margins, and sets the font size. The close execute sets the variable IONOFF to an empty string (effectively defining it in the symbol table), and sends a reset to the printer. Right Margin and Back Space aren't used with printers; Form Feed goes into the M variable IOF, Page Length goes into the M variable IOSL ("IO Screen Length") determines how many lines are to be printed on each page before VISTA sends an IOF to go to the next page. That's important to keep in mind since the number of lines that VISTA prints needs to match how many lines are available on the page, otherwise the printer will either spit an extra page containing the extra lines or it will clip the output, depending on whether you specified how many lines are to be printed in PCL. The subtypes below don't specify how many lines to print, so the former behavior will happen with them. The solution is to decrease page length.

The reason IONOFF is needed is that by default VISTA will send an extra page following each print out; because it was developed in the days of dot-matrix printers, where the extra page separated jobs. The days of dot-matrix printing are practically over; most printers used today are inkjet or laser. Typically we don't want an extra page at the end. You may be lead to believe that IONOFF is enough; however, most reports in VISTA have hardcoded extra pages at the beginning or end. I was told there was going to be a project in the late 90's to make sure all reports relied on the device handler for printing separator pages, but that never happened.

Here are the most common subtypes in VISTA (standardized for Unices; you will need to remove $C(27),"&k2G" on Windows Servers):

NB: CPI = Characters Per Inch; LPI = Lines Per Inch

PCL5 Quick Reference

*27,"E"/$C(27,69) - Reset
*27,"&l0O" - Portrait / *27,"&l1O" - Landscape
*27,"&l3E" - Top Margin is 3 lines
*27,"&a5L" - Left Margin is 5 columns
*27,"&k2G" - Line endings are LF. Default Line endings are CRLF (unless overridden in printer settings).
*27,"(s0p12h0s0b4099T" - Primary '(s' font is fixed pitch, 12 cpi, upright (not italic), not bold, and is the Courier Font (#4099).

Portrait 12 CPI 6 LPI

This is THE MOST COMMON subtype to use. Most reports in VISTA print on this one.

NAME: P-HP-LTR-POR-C12L6-W80           RIGHT MARGIN: 80
  FORM FEED: #                          PAGE LENGTH: 56
  BACK SPACE: $C(8)
  OPEN EXECUTE: W $C(27),"E",$C(27),"&l0O",$C(27),"&l3E",$C(27),"&a5L",$C(27),"&
k2G",*27,"(s0p12h0s0b4099T" S ($X,$Y)=0
  CLOSE EXECUTE: S IONOFF="" W *27,"E"
  DESCRIPTION: 12 cpi 6 lpi width 80 standard letter printer

Landscape 14 CPI 6 LPI

This is the second most common subtype. Any menu option that says it needs 132 characters will need to use this subtype.

NAME: P-HP-LTR-LAND-C14L6-W132          RIGHT MARGIN: 132
  FORM FEED: #                          PAGE LENGTH: 45
  BACK SPACE: $C(8)
  OPEN EXECUTE: W $C(27,69),$C(27),"&l1O",$C(27),"&l3E",$C(27),"&a5L",$C(27),"&k
2G",*27,"(s0p14h0s0b4099T" S ($X,$Y)=0
  CLOSE EXECUTE: S IONOFF="" W $C(27)_"E"
  DESCRIPTION: 14 cpi 6 lpi width 132 landscape letter printer