I have a Datecs DPP-450 ESC POS thermal printer, which comes with an API.
I can successfully print over Bluetooth, since the API provides simple codes for connecting, printing texts and borders, but I am unable to set page height bigger than 2000+ ( dots I think ). I am printing invoices and I need height bigger than 2000. I have search on the internet and found :
ESC W xL xH yL yH dxL dxH dyL dyH.
Set printing area in page mode
[Range] 0≤ xL xH yL yH dxL dxH dyL dyH ≤255 (except dxL=dxH=0 or dyL=dyH=0 )
[Description] The horizontal starting position, vertical starting position, printing area width, and printing area height are defined as x0, y0, dx, dy, respectively. Each setting for the printable area is calculated as follow:
x0 = [(xL + xH x 256) x (horizontal motion unit)]
y0 = [(yL + yH x 256) x (vertical motion unit)]
dx = [(dxL + dxH x 256) x (horizontal motion unit)]
dy = [(dyL + dyH x 256) x (vertical motion unit)]
, but can't manage to make it work.
Not much code to show, I have tried :
printer.reset();
printer.write(new byte[]{0x1B});
printer.write(new byte[]{0x57});
printer.write(new byte[]{0}); OR new byte[]{0x30}
printer.write(new byte[]{0}); OR new byte[]{0x30}
printer.write(new byte[]{0}); OR new byte[]{0x30}
printer.write(new byte[]{0}); OR new byte[]{0x30}
printer.write(new byte[]{64}); OR new byte[]{0x36, 0x34}
printer.write(new byte[]{3}); OR new byte[]{0x33}
printer.write(new byte[]{96}); OR new byte[]{0x39, 0x36}
printer.write(new byte[]{11}); OR new byte[]{0x31, 0x31}
printer.selectPageMode(); // make printer enter PAGE MODE
Any ideas of correct way to get a height around 5000 ? As a workaround I can print piece by piece but I'm sure there is a better way.