Setup and User Guide > Printer Configuration > Init File Commands

ORIENTATION

ORIENTATION = LANDSCAPE

(Windows only, PASSHTHROUGH must be off.) The page orientation (portrait or landscape) may be specified for Windows laser or graphics printers. The default is PORTRAIT.

The ORIENTATION statement only works properly when the natural or manual configuration of the printer is PORTRAIT, and when the print request does not allow the user to interactively select the printer. In the case of interactive printer selection, the orientation will be as selected by the user in the interactive printer configuration dialog. ORIENTATION=PORTRAIT cannot be used to override a printer whose current driver configuration is set to LANDSCAPE.

Note that paper orientation is something that has to be set at the time the printer context is initialized, so it cannot be set within the print file itself. The only way to do it is to add the ORIENTATION=LANDSCAPE command to the printer init file.

Also note, however, as explained in the Defining Spoolers topic, that printer init files are processed at the time reports are sent to the printer. This means that you can switch between landscape and portrait printing on a given printer, but you must have that printer identified twice to A-Shell: once as a portrait printer, once as a landscape printer. So when printing a landscape-oriented report, you would send the report to the printer called, for example, "HPland." When producing and printing portrait-oriented reports, they would be sent to the "HPport" printer. "HPland" and "HPport" are, of course, the same printer, which have only different (a) printer init file names, and (b) ORIENTATION = lines.

Slightly contradicting the above, it is possible to switch into and out of landscape mode using the switches parameter in the SPOOL (EZSPL) subroutine.