Adds nondisplay characters to the program for sending a sequence to the printer.
CODE-PRINTER printer_typeValid values for printer_type are HT, HP, PS, LP, HTML, HPLASERJET, POSTSCRIPT, and LINEPRINTER.
CODE-PRINTER places the string “behind” the page buffer, rather than within it, so alignment of printed data is not thrown off by the white space consumed by the nondisplay characters. Only strings can be printed using CODE‑PRINTER.
Since the report might be printed on different types of printers, you should specify for which type this data is used. The report is ignored if printed to a different type. If necessary, you can send a different sequence to another type with a second PRINT statement.
encode '<27>[5U' into $big_font encode '<27>[6U' into $normal_font ... print $big_font (0, +2) code-printer=lp print &phone () edit '(xxx) xxx-xxxx' print $normal_font () code-printer=lp
In the previous example, the two CODE-PRINTER arguments put the $big_font and $normal_font sequences into the output, without overwriting any data in the page buffer. Sequences printed with the CODE-PRINTER argument are positioned using the regular line and column positioning. However, unlike PRINT, the current print location after execution is the beginning location where the CODE‑PRINTER string was placed. Multiple coded strings printed using the same line and column location appear in the output in the same sequence in which they were printed.