17

I am printing images on an Intermec PB51 using ESC/P language.

In the ESC V command specification, it says:

After the printer receives this command, the printer dumps the binary data supplied directly to the printhead. Graphics printed with this command must be the exact width of the printhead in bits.

The printhead query command (PH?) replies with a TD parameter that is documented as

TD: Total number of dots across the printhead.

When I send the printhead query command to my Intermec PB51, it responses with 0864 as the total number of dots, but when i use 864 as the printer width in my image printing function, the image is screwed up and (as I seem to send too many bytes, the printer is in an invalid state afterwards).

Choosing a value of 832 prints the image just fine. Now the question is, where are those extra 32 bits (4 bytes) coming from?

Below find an image print with hardcoding dotsAcross to 832 enter image description here

If I use 864, as the printer suggests, the output looks like this enter image description here

esskar
  • 10,638
  • 3
  • 36
  • 57
  • Is this the product you're talking about? http://www.intermec.ca/products/prtrpb51/index.aspx – starlocke Nov 17 '15 at 14:22
  • @starlocke yes, that is the device. – esskar Nov 17 '15 at 14:46
  • Are you using the 111mm width paper? 8 dots/mm and 108mm gives you your 864 but the pb51 can use from 50mm to 111mm wide paper. A thinner paper reel could screw things up. – paxdiablo Nov 19 '15 at 09:36
  • @paxdiablo not sure about the paper size, but the printer should be able to tell me what he assumes when he assumes something different then 862; i added the printouts – esskar Nov 19 '15 at 12:13
  • Have you tried a status query before printing the image(ESC{ST?})? If so, what's the output? – wizurd Nov 20 '15 at 03:29
  • @wizurd well the output is something like {ST!E:N;L:D;P:P;R:62;B:O,H:O} – esskar Nov 20 '15 at 07:55
  • 864 pixels is also what the specification says (max print width is 108 mm which yields 864 dots when using 8 dots per mm). Could it be that your program that sends the image to the printer accidentally transmits four extra bytes per line? – Marc Balmer Dec 31 '16 at 17:19

0 Answers0