HP Pcl 5 Manual
Have a look at the manual HP Pcl 5 Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 1114 HP manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.
ENRaster Width Command 15-13 Raster Width Command The Raster Width command specifies the width in pixels of the raster area. Width is in the direction that the raster rows are laid down, hence, width is subject to the current raster presentation mode and print direction (see Figure 15-8). E C* r # S # =Width in pixels of the specified resolution Default =depends on raster presentation mode - when presentation mode is 0, width = width of logical page - left graphics margin when presentation mode is 3 then width = dimension of logical page along paper length - left graphics margin Range =0 to (logical page width – left graphics margin) * *Greater values default to the (logical page width – left graphics margin). This command allows you to implicitly tell the printer to pad raster rows that are not specified for the full raster width with zeros. Unspecified data maps to either white or transparent depending on the source transparency mode. When a Transfer Raster Data command is received that specifies a row of data that is longer than the raster width, the data that extends past the raster width is clipped. This command is ignored after the Start Raster Graphics or Transfer Raster Data commands, until the next End Raster Graphics command. NoteOnly raster data appearing within the intersection of the logical page, the printable area, and if set, the raster width and height is printed. Data outside the intersection is clipped.
15-14 Raster GraphicsEN Figure 15-8 Maximum Raster Width Start Raster Graphics Command The Star t Raster Graphics command identifies the beginning of the raster data and also specifies the left graphics margin. E C * r # A # =0- Start graphics at default left graphics margin X-position 0). 1 - Start graphics at current cursor position (current X-position). Default =0 Range =0, 1 (values outside the range default to 0) A value of 0 specifies that the left graphics margin is at the default left margin of the page (X-position 0). A value of 1 specifies that the left graphics margin is at the current X-position. In presentation mode 3, the location of the left graphics margin varies depending on the orientation. Once a Star t Raster Graphics command is received by the printer, raster graphics resolution, raster graphics presentation mode, raster height, raster width, and left raster graphics margin are fixed until an end raster graphics command is received.
ENRaster Y Offset Command 15-15 Once in Raster Graphics Mode, PCL commands and text imply an End Raster Graphics ( E C*rC) except for the following commands: zTransfer Raster Data zSet Raster Compression Method zRaster Y Offset In addition, the following commands are ignored (i.e., locked out) while in Raster Graphics Mode and do not imply an End Raster Graphics command: zStart Raster Graphics zSet Raster Width zSet Raster Height zSet Raster Presentation Mode zSet Raster Graphics Resolution NotesAn implied End Raster Graphics resets the Raster Compression Method 3 seed row, but does not reset the Raster Compression Method nor the left raster graphics margin. If source and/or transparency modes have been set, frequent start/end graphics commands in an image can result in a memory overflow condition. Raster Y Offset Command The Raster Y Offset command moves the cursor position vertically the specified number of raster lines from the current raster position in the raster area. E C * b # Y # =Number of raster lines of vertical movement Default =N/A Range =0 - 32767 This command is recognized only while in raster graphics mode and only within the raster area.
15-16 Raster GraphicsEN Set Compression Method Command The Set Compression Method command allows you to code raster data in one of four compressed formats: Run-length encoding, tagged imaged file format (TIFF) rev. 4.0, delta row compression, and adaptive compression. The choice of compression methods affects both the amount of code needed to generate a raster graphic image and the efficiency with which the image is printed. E C& * b # M # =0- Unencoded 1 - Run-length encoding 2 - Tagged Imaged File Format (TIFF) rev. 4.0 3 - Delta row compression 4 - Reserved 5 - Adaptive compression Default =0 Range =0 - 5 (values outside the range are ignored) Unencoded (Method 0) This is a simple binary transfer of data: no compression. Each bit describes a single dot. Bit 7 of the first byte corresponds to the first dot within the raster row, bit 0 corresponds to the eighth dot, and so on. NoteCompressed data formats allow for efficient transfer of data from the host system to the printer. However, compressed data formats do NOT reduce the amount of printer memory required to produce an image. Run-length Encoding (Method 1) Run-length encoding interprets raster data in pairs of bytes. The first byte of each pair is the repetition count for the data in the second byte. The second byte is the raster data to be printed. A repetition count of 0 signifies the pattern in the data byte is not repeated (it occurs only once). A repetition count of 1 signifies the pattern occurs twice. The repetition count can range from 0 to 255 for a repetition of 1 to 256 times. [(Repetition count byte 0-255)(pattern byte)] . [ . ] [ ]
ENSet Compression Method Command 15-17 Tagged Image File Format Encoding (Method 2) Tagged image file format encoding interprets raster data as TIFF “Packbits.” This format combines features of methods 0 and 1. A control byte precedes the raster data (pattern bytes). The control byte identifies whether the pattern byte(s) represent a byte that is to be repeated some number of times (up to 127), or represent some number of bytes (up to 127) which are to be printed as is (literal). The sign of the number in the control byte identifies whether the byte or bytes that follow represent a literal pattern or byte to be repeated. A positive number (1 to 127) indicates that the bytes are literal. A negative number (-1 to -127), represented by the twos complement, indicates a repeated byte. The value of the number, if positive (literal), identifies the number of pattern bytes which follow the control byte; if negative (repeated), identifies the number of times to repeat the following byte. A pattern byte may be repeated up to 127 times; or up to 127 literal bytes may follow the control byte. As mentioned, for a byte to be repeated, the control byte must be a negative value as represented by the twos complement. For example, to repeat a pattern three times would require the twos complement of the number 3. The twos complement is computed as follows. The binary of 3 is 00000011. Complement each bit to get 11111100, then add one to this value to produce 11111101, the twos complement. The decimal value of this number, 253, used in the control byte, produces a repetition of 3 bytes for a total of 4 occurrences of the pattern.
15-18 Raster GraphicsEN The range of numbers for the control byte is shown below. NoteAnother method to calculate the number needed in the control byte for some number of repetitions is to subtract the number of desired repetitions from 256. For example, the control value for 3 repetitions (4 occurrences) of a byte is 256 minus 3 = 253. A zero or positive value in the control byte means that the subsequent byte or bytes are non-replicated bytes of data. The value of the control byte plus one indicates the number of data bytes that follow. For example, a control byte of 0 means the following 1 byte is literal raster data. A control byte of 6 indicates that the following 7 bytes are literal raster data bytes. Table 15-3 Literal Pattern Values # of Bytes Binary value Decimal value 1 0000 0000 1 to to to 127 0111 1111 127 Table 15-4 No Operation Value NOP value Binary value Decimal value 128 (-128) 1000 000 128 Table 15-5 Repeated Pattern Values # of Repetitions Binary value 1 1. These negative values are represented by taking the twos complement of the value of the number.Decimal value 1 (-1) 1111 1111 255 to to to 127 (-127) 1000 0001 129
ENSet Compression Method Command 15-19 TIFF encoding also allows you to include a non-operative (NOP) control byte, represented by the value –128. This byte is ignored, and the subsequent byte is treated as the new control byte. NoteIt is more efficient to code two consecutive identical bytes as a repeated byte. If these bytes are preceded and followed by literal bytes, however, it is more efficient to code the entire group as literal bytes. Examples: Run-length and TIFF Compression The following examples show how a raster row can be coded using run-length and TIFF compression methods. Note that the compression examples use characters to represent the binary data stream. Unencoded E C*r1A E C*b0m7WUUUUATT E C*rC Run-length Encoding E C*r1A E C*b1m6W(3)U(0)A(1)T E C*rC Table 15-6 Byte Number#1 #2 #3 #4 #5 #6 #7 Bits 01010101 01010101 01010101 01010101 01000001 01010100 01010100 ASCIIUUUUA T T
15-20 Raster GraphicsEN TIFF Encoding E C*r1A E C*b2m6W(-3)U(0)A(-1)T or E C*b2m6W(-3)U(2)ATT E C*rC In the TIFF encoding example above, parenthetical expressions are used to identify control bytes. For example, the byte (-3) is shown to represent the control byte for a repetition (minus value) of 3. The actual value for this position is the decimal value 253. Additional “encoded” control bytes in this sequence include: (0) for decimal 0, (-1) for decimal 255, and (2) for decimal 2. The raster data (pattern) bytes are represented as by the ASCII character. Delta Row Compression (Method 3) Delta row compression identifies a section of bytes in a row that is different from the preceding row, and then transmits only that data that is different (the delta data). If a row is completely different from its preceding row, then the entire row must be sent as the delta (not very efficient); if only one bit is different, then only one byte is identified and sent. To reassemble the raster data rows, the printer takes the current row (referred to as the seed row) and makes the changes indicated by the delta data, to create the new row. The new row (which becomes the new seed row) is used by the next delta compression data to create another row. A delta compression row consists of two parts, a command byte and the replacement bytes, as shown below: [(Command byte)(1 to 8 Replacement bytes)] The command byte identifies two things: 1) the number of replacement (delta) bytes that follow; and, 2) where to position the replacement byte string (the left offset). The replacement bytes are some number (up to eight bytes) of consecutive bytes that are used to create the new row from the seed row.
ENSet Compression Method Command 15-21 If more than eight replacement (delta) bytes are needed, additional command byte/replacement bytes may be added, as shown below: E C*3m#W [(Command Byte)(1 to 8 Replacement Bytes)][(Command Byte)(1 to 8 Replacement Bytes)]. . . In the command byte, the upper three bits identify the number of replacement (delta) bytes (which can be 1 to 8 bytes). The lower five bits identify the location the replacement bytes are to be positioned. This position is identified as some number of bytes in, from the first untreated byte, referred to as the offset. For example, if there are 5 replacement bytes and the offset is 7, then the replacement bytes replace byte 7, 8, 9, 10, and 11 (the five bytes beginning at byte 7 from the seed row). If there is more than one replacement in a row, the second offset is counted from the next untreated byte in the row: the first byte following the last replacement byte. Figure 15-9 Table 15-7 Command Byte 7540 Number of bytes to replace (1-8) Relative offset from last untreated byte
15-22 Raster GraphicsEN As mentioned, the offset is contained in the lower five bits of the command byte allows for offset values from 0 to 31. Compression mode allows offsets larger than 31 bytes as follows: zAn offset value of 0-30 indicates that the replacement bytes are offset from the 1st byte to the 31st byte. zA value of 31 indicates that the next byte following the command byte is an additional offset byte which adds to the first (32) offset value. This allows offset values larger than 31. Also, if this second offset byte is set to 255 (all ones), additional offset bytes follow until the required offset value is obtained. When the formatter detects an offset byte less than 255, it is assumed to be the last offset value and the offset bytes are then totaled (added). The following example shows an offset larger than 31: Figure 15-10 The total offset 414, which is the sum of the three offset values: 31 + 255 + 128. Seed Row The seed row is basically the current raster data row; the row being printed. It is maintained by the printer for use by delta row compression. The delta compression replacement bytes are applied to the seed row to create the new row. This new data row is printed and becomes the new seed row. The seed row is updated by every raster graphic transfer, regardless of the compression method. This allows delta compression method to be mixed with other methods to achieve better compression performance.