This is an example of an 80-column text file which has been tagged as
. Because can not contain tags, Print Wizard will not be
confused by any pre-existing less-thans or ampersands. We can, however, include
tags BEFORE the tag to cause job-level changes, such as going to
landscape orientation.
------------------------------------------------------------------------------
Print Wizard is a body of logic that figures out how to print text data in an
environment where the printer being used has a great deal of flexibility in font
sizing, text positioning, line spacing, page margins, etc. Print Wizard logic
has been implemented in the passthrough print channel of AnzioWin, a terminal
emulation program (telnet client) from Rasmussen Software. Also in AnzioWin, it
can be used with the PRINTFILE command to print a DOS-based text file. Print
Wizard has also been implemented as a freestanding Windows program capable of
printing a wide variety of text files. A Windows-based LPD (Line Printer
Daemon) is under development. Future implementations will be as a UNIX-based
filter program, which will allow Print Wizard's capabilities to be used on UNIX
system printers, and as a Windows DLL.
THE FIRST PROBLEM - LEGACY DATA ON A MODERN PRINTER
Many programs generate print data that is at the lowest common denominator:
lines of text separated by Carriage Return/LineFeeds (CRLFs). There may be
FormFeeds (FFs), or there may be an assumption built in about page length. There
may be 80 characters per line or there may be 132, or some other number. There
may be tabs, backspace-bolding or backspace-underlining. There may be an
assumption of 6 lines per inch or 8 lines per inch. Finally, there may be
embedded control codes for a particular printer type, to do initialization, for
instance.
This print data may be being generated anew, or it may be contained in a
"printfile" stored on disk.
The user needs to print this data. But the user has a 600-dpi laser printer. It
can print in any font, in any size, in any orientation, with any margins, with
any linespacing, in any character set. Something has to tell that printer how to
deal with a raw data stream.
THE SECOND PROBLEM - LEGACY PROGRAMS THAT WANT TO FLY
System designers, writing programs in a database language, COBOL, BASIC, etc.
would like to take advantage of modern printers' capabilities, but don't have a
way to do so. There are hundreds of printer types available, and it seems unwise
to tie oneself to a particular model, especially hardcoded into the source
program. What is needed is a device-independent way to drive high-end printer
features.
Items to be controlled start at the job level, with such things as paper size
and orientation, margins, line spacing, and character size. They can continue
through simple text style changes (bold, italic) to drawing lines, rectangles,
and gray bars. At the high end, one could include bitmaps, forms overlays, and
barcodes. Many elements would need to be positioned precisely on the page.
ANZIO'S STANDARD PRINTING
AnzioWin's standard printing is selected by turning Print Wizard off (in Anzio
Lite, Print Wizard is always off). In this mode, the user has pre-selected a
printer, paper size and orientation. If the user selects Low-level Print, then
data to be printed is sent to the printer at a very low level. If the print
data contains control codes specific to that printer type, these will be obeyed,
to do such things as setting font and line spacing. In the absence of these,
the printer will use its defaults.
If Low-level Print is off, the user can also select a font and font size. The
font size (in points) is actually the height, and it dictates both the font
width and the line spacing. These in conjunction with the printable region of
the paper (as indicated by the Windows printer driver) determine characters per
line and lines per page. Anzio will automatically wrap long lines; it will
cause page breaks when advanced beyond end of page; it will also deal with the
control characters:
Formfeed hex 0C Advance to next page
Return hex 0D Carriage Return
Linefeed hex 0A Down one line
Tab hex 09 Every 8 spaces
Backspace hex 08 Back up one space
Backspace is used in some data streams, such as from UNIX "man" pages, to do
overprinting for bold and/or underline. Anzio will translate these into actual
bold and/or underline fonts.
PRINT WIZARD
PRINT WIZARD, PHASE ONE
Phase One of Print Wizard was introduced in AnzioWin version 10.9. The goal
was to handle in a reasonable manner a wide variety of types of print data
being passthrough-printed from the host system. This had the effect of
removing from the user the
responsibility of making certain decisions before executing a print job.
The user always must indicate a printer to be used, a paper size, an
orientation (portrait or landscape), and a font. With Print Wizard turned on,
however, the user no longer needs to be concerned with font size or Low-level
Print.
Print Wizard does not start printing text as soon as it is received. Instead,
several hundred lines are stored in a buffer so they can be analyzed. Print
Wizard first determines whether the data stream a) is PostScript, or b)
contains Escape codes.
If either of these is true, it sets the low-level print flag, and all print
data is sent to the printer at a very low level.