zebra icon indicating copy to clipboard operation
zebra copied to clipboard

Blank page after image

Open sv1gzf opened this issue 9 years ago • 4 comments

After printing an image label we get a blank page.

we solved the issue with this fix

/** * Compress a row of ASCII hexadecimal data. * * @param string $row * @param string $lastRow * @return string */ protected function compress($row, $lastRow) { //if ($row === $lastRow) { // return ':'; //}

    $row = $this->compressTrailingZerosOrOnes($row);
    $row = $this->compressRepeatingCharacters($row);

    return $row;
}

sv1gzf avatar Apr 07 '16 10:04 sv1gzf

I can't seem to reproduce that. The line you commented out simply returns a colon if the current row matches the last row (and omits the current row). The total number of rows (height of the image) should be the same.

Can you supply a sample?

robgridley avatar Apr 07 '16 12:04 robgridley

I'm using this code $client = new Client('192.168.4.204'); $zpl = new Builder(); $zpl->fo(0,0)->gf(new Image(file_get_contents('voucher.gif')))->fs(); $client->send($zpl); $zpl = new Builder(); $zpl->fo(0,0)->gf(new Image(file_get_contents('receipt.gif')))->fs(); $client->send($zpl);

OR

$client = new Client('192.168.4.204'); $zpl = new Builder(); $zpl->fo(0,0)->gf(new Image(file_get_contents('voucher.gif')))->fs(); $zpl->fo(0,0)->gf(new Image(file_get_contents('receipt.gif')))->fs(); $client->send($zpl);

Attached you can find the labels

voucher receipt

sv1gzf avatar Apr 08 '16 10:04 sv1gzf

When I un-comment these lines //if ($row === $lastRow) { // return ':'; //}

I get an extra blank page after the first label.

sv1gzf avatar Apr 08 '16 10:04 sv1gzf

Any luck with this ?

sv1gzf avatar Apr 19 '16 10:04 sv1gzf