Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank page after image #3

Open
sv1gzf opened this issue Apr 7, 2016 · 4 comments
Open

Blank page after image #3

sv1gzf opened this issue Apr 7, 2016 · 4 comments

Comments

@sv1gzf
Copy link

sv1gzf commented Apr 7, 2016

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;
}
@robgridley
Copy link
Owner

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?

@sv1gzf
Copy link
Author

sv1gzf commented Apr 8, 2016

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
Copy link
Author

sv1gzf commented Apr 8, 2016

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

I get an extra blank page after the first label.

@sv1gzf
Copy link
Author

sv1gzf commented Apr 19, 2016

Any luck with this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants