escpos-php icon indicating copy to clipboard operation
escpos-php copied to clipboard

bitImageColumnFormat() stretch image and print out of page borders

Open PietroGranati opened this issue 3 years ago • 1 comments
trafficstars

Hi, I'm printing using bitImageColumnFormat on a brother label printer. I already know that this is not a label printer library, but this printer support almost every command I've sended and customized some. I'm asking for help to understand whats going on, because if I put an image of 250 px it stays in the borders, but the image is stretched like it's compressed in height. I've tried to increase the line feed space but nothing worked. If I put the same image I put in the ESC/POS printer (560px) the image is cutted out, the QRCODE the texts all seems stretched, for me it's seems like the image is calculated on an 80mm paper when the label is 60mm but even if it were 80mm the image would not fit.

Any ideas?

PietroGranati avatar Jun 22 '22 12:06 PietroGranati

Ok I found out that double width and double height fix the stretch so following the printer guide I tried modify the density char and found out that $this->connector->write(self::ESC . "*" . chr(39) . $header . $line); works correctly

PietroGranati avatar Jun 22 '22 15:06 PietroGranati