More about Direction
In PPFA, directions specified with the PRINTLINE and TRCREF commands are relative to the direction specified in the PAGEFORMAT command. If no PAGEFORMAT command has been specified, the direction specified in the PAGEDEF command is used. If no direction has been specified in either of these commands, the default direction for the page format is ACROSS.
The PRINTLINE and TRCREF commands add their DIRECTION values to the DIRECTION value specified with the PAGEFORMAT command. Thus, you may select a PAGEFORMAT direction and code PRINTLINEs and TRCREFs relative to the PAGEFORMAT direction. For more information about the PRINTLINE and TRCREF commands, see Using Page Definition Commands for Traditional Line Data.
For instance, if a page is to be printed in the landscape page presentation on a printer that requires the DOWN or UP print direction to generate landscape output, the PAGEFORMAT command can specify DOWN as its DIRECTION. Once this direction is established, you can view the page as a landscape page and specify the PRINTLINE and the TRCREF commands with the ACROSS direction. Output specified in this way prints ACROSS relative to the landscape page, as shown in Figure Printing Across a Landscape Page.
Printing Across a Landscape Page
Printing Down a Portrait Page
The next table shows the final result when all of the possible combinations of DIRECTION are specified. The final direction that PPFA computes from the PAGEFORMAT, PRINTLINE, and TRCREF commands determines the prefix assigned to the font names specified in the page definition. The final direction is particularly important when printing on the 3800 printer because its unbounded-box font architecture requires a separate font for each combination of print direction and character rotation. This information is encoded in the prefix of the font name (X1, X3, XA, and XF, for example).
The Effect of Additive DIRECTIONs on Formatting and Font Prefixes
Page Format | PRINTLINE or TRCREF | Final Result | 3800 Font Prefix | |||
---|---|---|---|---|---|---|
0° | 90° | 180° | 270° | |||
Across | Across | Across | X1 | X5 | X9 | XD |
Across | Down | Down | X2 | X6 | XA | XE |
Across | Back | Back | X3 | X7 | XB | XF |
Across | Up | Up | X4 | X8 | XC | XG |
Down | Across | Down | X2 | X6 | XA | XE |
Down | Down | Back | X3 | X7 | XB | XF |
Down | Back | Up | X4 | X8 | XC | XG |
Down | Up | Across | X1 | X5 | X9 | XD |
Back | Across | Back | X3 | X7 | XB | XF |
Back | Down | Up | X4 | X8 | XC | XG |
Back | Back | Across | X1 | X5 | X9 | XD |
Back | Up | Down | X2 | X6 | XA | XE |
Up | Across | Up | X4 | X8 | XC | XG |
Up | Down | Across | X1 | X5 | X9 | XD |
Up | Back | Down | X2 | X6 | XA | XE |
Up | Up | Back | X3 | X7 | XB | XF |
The entries in the Final Result column can be computed using a simple algorithm. If you assume that ACROSS is 0, DOWN is 1, BACK is 2, and UP is 3, you can add the direction specifications in the two commands, subtracting 4 when the result is 4 or greater, to compute the final direction.