Differences in Measurements and REPEATs with AFP Utilities

When repeating a DRAWRULE (OGL), PRINTLINE (PPFA), DRAWGRAPHIC (PPFA), or Line (PMF), there are differences in the measurements of the repeated lines. For OGL, REPEAT indicates the number of repetitions in addition to the first. For DRAWGRAPHIC (PPFA), REPEATT is the same as OGL. Therefore, REPEAT yields 2 DRAWRULEs. For PPFA, REPEAT indicates the total number of PRINTLINEs. Therefore, REPEAT yields 2 PRINTLINEs.

Another difference occurs when the line spacing (set by SETUNITS in OGL and PPFA, and by a screen item in PMF) results in the distance from one line to the next not being a whole number of pels. Each product handles the fractional pel differently. Because the printer cannot print parts of a pel, fractional pels cannot be represented at the printer. When line spacing calculations result in a fractional pel per line space, the following occurs:

OGL
Carries the fractions until they add up to a whole pel, then adds it in. This results in the final spot of a repeat being within a pel of where it is expected. Therefore, not all of the spaces between rules are even; they can vary by one pel.
PPFA
Truncates the fractional pel prior to the repeat. Therefore, the spaces between the lines are even, but the total might be shorter than expected.
PMF
Rounds the fractional pel prior to the repeat. Therefore, the spaces between the lines are even, but the total might be shorter or longer than expected. If the fractional pel is less than 0.5, it is handled the same as PPFA and the line space is shorter. If the fractional pel is greater than or equal to 0.5, the line space is longer.

Use line spacing in all products that result in a whole number of pels. To resolve existing problems, select the resource that you don't want to change, and code the remaining resource without using REPEAT because of the way the other products handle the fractional pels.

For example, if you want to print at 9 lines per inch, and repeat this for 20 lines, the following occurs. Starting at zero, and adding 9 lines per inch (converted to pels this is 240/9 = 26.6670), you see the results illustrated in the next table.

Differences in Measurements and REPEATs with AFP Utilities

Repetition Mathematics OGL PPFA PMF
Position FromLast Position FromLast Position FromLast Position FromLast
  0.000 -.--- 0 --- 0 --- 0 ---
1 26.667 26.667 26 26 26 26 27 27
2 53.333 26.667 53 27 52 26 54 27
3 80.000 26.667 80 27 78 26 81 27
4 106.667 26.667 106 26 104 26 108 27
5 133.333 26.667 133 27 130 26 135 27
6 160.000 26.667 160 27 156 26 162 27
7 186.667 26.667 186 26 182 26 189 27
8 213.333 26.667 213 27 208 26 216 27
9 240.000 26.667 240 27 234 26 243 27
10 266.667 26.667 266 26 260 26 270 27
11 293.333 26.667 293 27 286 26 297 27
12 320.000 26.667 320 27 312 26 324 27
13 346.667 26.667 346 26 338 26 351 27
14 373.333 26.667 373 27 364 26 378 27
15 400.000 26.667 400 27 390 26 405 27
16 426.667 26.667 426 26 416 26 432 27
17 453.333 26.667 453 27 442 26 459 27
18 480.000 26.667 480 27 468 26 486 27
19 506.667 26.667 506 26 494 26 513 27
20 533.333 26.667 533 27 520 26 540 27

To resolve differences in how OGL, PPFA, and PMF handle repeated values, one of the following approaches may be taken:

  • Do not use REPEAT
  • Code units as PEL(s)

    Note that in all of these products (except PPFA), a PEL is 1⁄240 of an inch. For PPFA, the PEL size can be set by the user, but defaults to 1⁄240 of an inch.