HP PCL/PJL reference (PCL 5 Printer Language) - Technical Reference Manual Part II

EN PE, Polyline Encoded 20-39
Note Values following the fractional data or select pen flag also must be
encoded.
while n ≥ base
output CHR$(63 + (n MOD base))
n = n DIV base
end
if base = 64 then n = 191 + n
if base = 32 then n = 95 + n
output CHR$(n)
Table 20-25 Terminator and non-terminator characters
Range Type Non-terminator Terminator
8-bit Range (base 64) 63-126 191-254
7-bit Range (base 32) 63-94 95-126
Table 20-26 Procedure for determining base range
STEPS EXAMPLE
Base 64. Encode all the low order
digits into the ASCII range 63 to
126. For a digit with value i, use
ASCII character "+CHR$(F) ’
CHR$(63 + i).| Encode the highest
order digit (or the single digit in a
one-digit number) into the range
191 to 254.
21,050 ÷ 4096 = 5
remainder 570
570 ÷ 64 = 8 remainder
58
5 - 4096ths place
58 - 1's place
Low order digit: 1's place
(63-126)
63 + 58 = 121
CHR$ (121)