Electronic Forms Integration with Unix based systems.
(Skip this section if you aren't worried about why we are doing the things specified in the following section)
PMS systems that run on Unix and uses the standard Unix "printer interface" files to add printer specific control codes to generic print data (the "print job") from applications. These files are actually executable scripts that are called to format the data and send it on to the Unix printer (shown on the left side of the Printer Setup screen) which is connected to a physical port somewhere. We can get the "overlay e-Forms command" control code to the printer by adding a line in these scripts that tells it to "print" that command to the printer with each print job. This will cause every print job sent to that printer interface to be overlaid with that e-Form. You can view and adjust this configuration by selecting option "14 - Database Maintenance" from the main menu then "31 - Spooler Menu" and finally "2 - Printer Setup"
The makers of Galaxey were forward thinking enough to make it a policy to set up a separate printer interface for each printer and for each report that could be printed on that printer. So, for example, a printer called fdlas7 (the 7th LASerjet printer at the Front Desk) might be connected to a port also called fdlas7 and might have printer interface files called fdfol7, fdcls7 and fdreg7 (the 7th FOLio, City Ledger Statement and REGistration printers at the Front Desk) Any print jobs sent to these interfaces, end up printing to the same printer, but the jobs can be formatted in different ways appropriate to the type of form they are being printed with.
Step by Step
Log in to the Unix command prompt as the root user.
Make a backup copy of the printer interface file by typing
cp followed by the name of the interface file for the
report and printer you are setting up e-Forms on then a space then that name
again with .bak after it and press the Enter or
Return key. E.g.
Type vi followed by the name of the interface file for
the report and printer you are setting up e-Forms on and press the
Enter or Return key. E.g.
Press the down arrow until you find the part of the program that looks like this:
# # Loop through all the files passed, for the number of copies specified # copy=1 while [ $copy -le $copies ] do for files in $files do cat /temp/soj.$user.$job $file /temp/eof.$user.$job | /opt/hpnp/bin/hpnpf -x $printer -N copy=`expr $copy + 1` done done
position the cursor on the "o" of the second "do" (the one under "for files in $files"), make sure Caps Lock is off and press the "i" key without holding Shift. The text "--- insert ---" will be displayed at the bottom of the screen.
Move the cursor one character to the right (so that it is after the "do") and press the Enter or Return key.
Press Tab or space keys until the cursor is just above the "c" in "cat /temp...". Use the Backspace key to backup if you make a mistake.
Press the Esc key to make the "--- insert ---" at the bottom of the
screen disappear and then type
You should see a message like
Now exit the command prompt and return to the Galaxey application. When you print a job to that printer, the PCL command will be sent with each page and if the e-Form SIMM or DIMM is installed in the printer, and has that form available, the e-Form will now print. Even without the e-Forms installed, the printer will simply realize that the form is not available and ignore the command.
To test that these codes are correctly entered, change the \033 to \043 (the "+") and print a page (make sure you are using the correct terminal and printer) you should see +&f21y4X for the Folio (or +&f31y4X for the statement, etc...) printed on the first line of the report. Then change the \043 back to an \033 without deleting any of the other codes, and this text should no longer print. This shows that the sequence is being interpreted as a command, rather than printable text, by the printer. The fact that the sequence disappears indicates that it is most probably entered correctly.
Once the e-Form's are working correctly, you should probably go back and
delete the backup files with the commands:
The /c at the end of the echo command suppresses the newline character normally added by echo.
The \033 is the escape character expressed in octal rather than decimal (27) or hex (1b).
http://www.hp.com/pond/modelscripts/hpux/net_lj4x Is a much more complex version of a printer driver that shows some of the same techniques.
Copyright ©2019 Electronic Forms Plus, Inc., 43537 Ridge Park Dr., Suite #106, Temecula, CA 92590