Please enable JavaScript to view this site.

A-Shell Reference

//ESCAPE, b1, b2, b3, b4,... (up to b14 max)

ESCAPE is used for passing raw ESC codes to the printer in the midst of GDI output.

Each parameter should be a decimal value representing the value of a single byte. Parameters B2 thru B14 are optional.

This directive is most useful for passing PCL commands to a PCL-compatible printer when you can't figure out how to accomplish the same thing using GDI commands. For example, laser printers normally have a built-in physical margin of 0.25 inches around the outer edit of the paper. But there is a PCL command to adjust this so that the first column printed is closer or farther from the edge of the paper. (This is useful for calibrating a printout to a form.) The PCL to move the left margin 300 decipoints to the right is:

ESC &l300U

If you try to just embed this directive in a GDI printout, it will probably be ignored by the driver. But using the ESCAPE directive, you can embed it as follows:

//ESCAPE,27,38,108,51,48,48,55