HP LaserJet 4100 HP PCL/PJL reference (PCL 5 Printer Language) - Technical Ref - Page 129
Encoding PE Flag Values and X, Y Coordinates, STEPS, EXAMPLE, Fraction adjustment.
View all HP LaserJet 4100 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 129 highlights
Note Encoding PE Flag Values and X,Y Coordinates Flag values and X,Y coordinates are encoded into a base 64 (default) or base 32 equivalent (7-bit mode). The following steps give a generic algorithm for encoding a number. Assume x is the number to be encoded. Use steps 1 and 2 only if you are encoding fractional data; otherwise, begin with step 3. When converting numbers to base 32 or 64 (step 4 in the following instructions), note that highest order digits are always in the high range, all other digits are in the low range. Therefore, if there is only one digit in a number, it is in the high range. Table 20-24 Procedure to encode a number STEPS EXAMPLE 1. Fraction adjustment. If you are using fractional data, this step converts the number of decimal places in your data to the number of binary fractional bits. Assume "n" is the number of fractional binary bits specified by the fractional data flag. x = 82.83 a. Multiply the number of decimal places contained in the data by 3.33. 2 × 3.33 = 6.66 b. Round that number up to the next integer to get integer n. n = round (decimal places × 3.33) x = x × 2n n = 7 x = 82.83 × 27 = 10,525.42 EN PE, Polyline Encoded 20-37