In this document, most offsets are in decimal, and most contents are in hex. I have attempted to mark all exceptions to this rule.
After the PJL header gives the line '@PJL ENTER LANGUAGE = QPDL\n', there is a QPDL header, followed by some number of bands of data, followed by a footer.
In each of the files I've observed, the PJL header is '\x1b%-12345X@PJL SET PAPERTYPE = OFF\n@PJL SET JAMRECOVERY = OFF\n@PJL DEFAULT SERVICEDATE=20051209\n@PJL ENTER LANGUAGE = QPDL\n'
A typical QPDL header (letter paper, 1200 dpi) is 00 06 00 01 00 00 00 00 00 01 00 01 00 00 02 01 0C (hex) the first bold bytes seem to vary with the page size, while the last bold byte is 0x06 in a 600x600dpi file.
I may have placed the beginning of the band a few bytes too early or late, but by my initial reckoning the first band begins at byte 17 with 0x0C 0xNN where NN is the number of the band. The band's length can be computed with band * 256 + band + 11.
A typical band header reads: 0C 0D 4D 80 00 80 11 00 00 05 A0 EF CD AB 09 40 00 00 00 (hex; bold numbers identical in all observed headers)
In "letter"-size pages, the last band is 0x32; legal is 0x40; A4 is 0x36; A5 is 0x25. The bands on a blank page are 1451 bytes long in each case.
If the band doesn't begin with 0x0C then it is the footer. In each of the files I've observed, the footer is 01 00 01 09 (hex) '\x1b%-12345X'
By taking the "fullpage.spd2" file and printing the bands in reverse order (with the sequence number fixed up, and the header and footer unchanged), I got a page where each band looked as expected, but they were in the wrong (bottom-to-top) order.
Half-baked ideas:Each band is an integral number of rows of image (a "band"), and identical bands are encoded identically, except for the sequence number.
Bands are encoded in a way that squeezes repetitions. The smallest possible band (the empty one) is 1451 bytes long.
Less baked ideas:A band on the blank page consists mostly of the repeated byte sequence ff c0, or maybe c0 ff.
The bytes in a band starting from around byte 16 are organized as a fixed length table of words. In featureless band, they count up from 1 to 64, but in featureful blocks they have different contents.
The byte values 0xff and 0xc0, or the double-byte value 0xffc0 / 0xc0ff have special significance. Viewed as words, the most common values are 0xc0ff, 0xffc0, 0, 0xffff, 0xffc3, 0x8000.
The 600x600DPI modeIn the 600x600DPI mode, an A5 page still has 25 bands, but the bands are 833 bytes long for a blank page.
0C 00 26 C0 00 80 11 00 00 03 36 EF CD AB 09 40 00 00 00 (hex; bold numbers differ from 1200x600 headers)
Website Copyright © 2004-2017 Jeff Epler