Please enable JavaScript to view this site.

A-Shell Consolidated Reference

//XOFFSET, ###

//YOFFSET, ###

These commands effect minor horizontal and vertical adjustments to the overall positioning of everything on the page except images. The units are twips (1440 to the inch), with positive values shifting the output down and to the right, negative up and to the left.

Because these commands do not affect images (e.g. IMAGE), they are most useful for adjusting text relative to a background image being used as a form. They are also the easiest way to shift an entire document (one without images), perhaps to line up better with a pre-printed form. TMARGIN and LMARGIN, which may seem similar, are actually very limited for that purpose, given their coarseness, side effects, and the fact that they have no effect on objects explicitly positioned with GDI directives.

XOFFSET and YOFFSET are among the operators that may be used both as printer ini file commands and as GDI printing directives. However, since the kinds of benefits provided by ?OFFSET tend to be document-specific rather than printer-specific, it makes more sense to use them as GDI printing directives than as ini file commands.

See also, and compare to, XORIGIN/YORIGIN, which are usually preferable.

Note that when used in conjunction with XORIGIN and YORIGIN, the effect is additive. This might make sense if you used XORIGIN and YORIGIN in all your printer ini files to standardize the origin across all your printers, and then found that you need to shift the contents of a particular report, or if you needed to shift the text relative to the images.

Note also that XOFFSET and YOFFSET can be used more than once. This is useful for repeating a printing pattern with a vertical and/or horizontal offset.