[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Forms



Here follows is an application of XY3+ that may be of interest to those who
work with HP compatible (PCL) printers and forms of one sort or another. By
combining the use of the FO command, Hewlett-Packard's PCL language, the IN
command, and a text editor (eg Norton disk edit), it is possible to send a
"mask" to a laser printer and then position text or PF commands within the
boundaries of the invisible form and print it all out as a "filled-in" form. A
couple of files are attached to demonstrate. Here's the process:

  1. Use XyWrite to design the form that will be sent to the printer by the IN
command. This could be a letterhead, a fill-in-the-blank sort of thing, a
border - whatever.

  2. Use the FO command to send the formatted output to the fo.tmp file.

  3. Use Xy to edit out the page eject and reset codes at the end of the
fo.tmp file. Insert the following string to return the print head to the 1st
column, 1st line of the document: [esc]&a0C[esc]&a0R (where [esc] is the symbol
you get when you press the escape key) Save the result as younameit.pcl (or
whatever)

  4. Use a text editor (eg Norton diskedit, but not XyWrite) to edit the pcl
file you just saved to replace the end of file (hex 1A) character (at the end
of the file) with a space (or other non-printing character). Save the edited
file. This file is now the "mask" of PCL printer codes, formatting and text or
whatever that will be sent to the printer by the IN command.

  5. As the first line of the file that will be superimposed on the "mask"
file, use the command: INc:\fullpath\younameit.pcl,0 to send the "mask" file to
the printer.

That's it. You'll see when you print the file that the text and formatting sent
to the printer after the IN command is laid down over the PCL "mask" created
earlier. In XY4 - you have to assign some amount of space in the IN command
(even .1) - anything but 0. One other problem with XY4 - you can't "back up" in
the overlay file. In 4 they changed the way vertical printer movement is sent
to the printer. In 3+ each line ending is sent as a given number of relative
vertical printer movements (eg 50), but in XY4 (presumably to allow calculation
of the size of the page and accurate depiction of page breaks), each line
ending is sent as an absolute number of vertical printer movements (eg 50, then
100, then 150, etc.) Consequently, if you send a command to the printer to back
up 3 lines and then type 3 lines of text, the first line will appear where you
sent it, but the 2nd and 3rd lines will appear on the line below the line where
the command originated. This may seem kind of esoteric (as may this whole
posting) but when the "mask" form is static and the overlay contains text of
indeterminate size, the ability back up the cursor position is akin to rolling
back the platen of a typewriter.

One last thing. - I haven't found a "modern" word processor that can do this.
So there.