RamyTalal / Label-Printer

Easily print labels with a Brother label printer.
MIT License
65 stars 22 forks source link

QL-720NW: disable auto cut #18

Closed mgjuhler closed 3 years ago

mgjuhler commented 3 years ago

I need to turn off auto cut on my QL-720NW when I print a series of labels. I have tried with FULL, HALF, CHAIN and SPECIAL but none of them have worked. Is there a way I can turn auto cutting off?

RamyTalal commented 3 years ago

I think it's possible (according to https://download.brother.com/welcome/docp000706/cv_ql720_eng_escp_100.pdf), but I haven't implemented that functionality.

ntaylor-86 commented 3 years ago

I've created a new class DisableCut() that allows you to disable the auto cut feature on the printer.

Example

$printer->addCommand(new Command\DisableCut());
$printer->addCommand(new Command\Text('Cut Disabled!'));
$printer->printLabel();

The New Class

Label-Printer/src/Command/DisableCut.php

<?php

namespace Talal\LabelPrinter\Command;

class DisableCut implements CommandInterface
{
    /**
     * @inheritdoc
     */
    public function read()
    {
        return chr(27) . 'iC' . chr(48);
    }
}

I have tested the DisableCut() command on a QL-810W with success. The commands seem to be the same between the QL-720 and the QL-810

I can create a pull request for both DisableCut() and EnableCut() commands if you would like @RamyTalal ?

ntaylor-86 commented 3 years ago

Hi @mgjuhler, the AutoCut command has been merged into the master branch. An example is available now in the README >> AutoCut Feature

v1.0.2 with the new command is now available via Composer 👍

CasperSiew15 commented 1 year ago

Hi. May I check can I change font color to other color? and add border?