Jim
You're almost right.
Changing the first byte to 0x14 turns the pattern from an original Format=0 pattern into a Format=20 pattern.
BUT you also need to add in four bytes, representing the X and Y design resolutions, after the original 8-byte header, making the header 12 bytes in length (and also add four to the value field in the accompanying {esc}*c#W sequence).
My original (format=0) patterns each have 8 bytes of header, followed by 32 bytes of pattern; the header bytes are:
byte 0 format (= 0)
byte 1 continuation (= 0)
byte 2 pixel encoding (= 1)
byte 3 reserved (= 0)
bytes 4-5 pattern height (pixels)
bytes 6-7 pattern width (pixels)
For a format 20 header, apart from changing the first byte, you need to add:
bytes 8-9 X resolution (dots-per-inch)
bytes 10-11 Y resolution (dots-per-inch)
So, for a resolution-specified 300 dpi pattern, the original 'Cross-hatch 1' pattern would be:
Code:
Cross-hatch 1:
[ 44 bytes ] [ 14 00 01 00 00 10 00 10 01 2c 01 2c 00 00 00 00 ]
[ 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 ]
[ 00 00 00 00 00 00 00 00 00 00 00 00 ]
which should provide the same output as the original format=0 pattern.
... and, for a resolution-specified 600 dpi pattern, the original 'Cross-hatch 1' pattern would be:
Code:
Cross-hatch 1:
[ 44 bytes ] [ 14 00 01 00 00 10 00 10 02 58 02 58 00 00 00 00 ]
[ 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 ]
[ 00 00 00 00 00 00 00 00 00 00 00 00 ]
which should provide finer hatching.
Note that the PCL5 Technical Reference Manual is incorrect (at least, my printed copy from 1992 is) in that whilst it refers to the extended pattern header, it indicates that the Format value should still be 0 - it should, as you've pointed out, be 20 (= 0x14).
Chris