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

EPSON TMU220 NOT PRINTING PROPERLY #887

Closed
aliibrahimroshan opened this issue Feb 28, 2020 · 1 comment
Closed

EPSON TMU220 NOT PRINTING PROPERLY #887

aliibrahimroshan opened this issue Feb 28, 2020 · 1 comment

Comments

@aliibrahimroshan
Copy link

aliibrahimroshan commented Feb 28, 2020

HI mike thanks for a great work.

I am using Epson TMU220 receipt printer. The printer is printing fine but i cant be able to get the tags
properly . i want 4 tags to print and cut. I saw your solution but its not working for me .

what i want is

TEXT 1
CUT
TEXT 2
CUT
TEXT 3
CUT
TEXT 4

here is my code

        $profile = CapabilityProfile::load("default");
        $connector = new WP('EPSON DRYCLEAN');
        $printer = new P($connector, $profile);

        for($i = 1; $i <= 3; $i++)
        {
            $printer -> text("Line $i\n");
            $connector -> write("\x1bi");
        }

        $printer -> cut();
        $printer -> close();

WhatsApp Image 2020-02-28 at 4 31 04 AM

//HERE IS THE RESULT

@aliibrahimroshan
Copy link
Author

incase if any once is facing the same

try
{

    $profile = CapabilityProfile::load("default");
    $connector = new WP('EPSON DRYCLEAN');
    $printer = new P($connector, $profile);

    $printer ->selectPrintMode(P::MODE_FONT_A);

    //TAG START
    //  $printer -> selectPrintMode();
    $printer -> selectPrintMode(P::MODE_DOUBLE_HEIGHT);
    $printer-> setDoubleStrike(true);
    $printer -> text("0066             32212000000014");
    $printer->  text("\n");

    $printer->  feed();
    $connector -> write("\x1bi");

    $printer->  feed();
    $printer -> selectPrintMode();
    $printer-> setDoubleStrike(true);
    $printer -> text("SPANTIK LAB      In:3/3/2020");
    $printer->  text("\n");
    //$connector -> write("\x1bi");

    $printer -> selectPrintMode(P::MODE_DOUBLE_HEIGHT);
    $printer-> setDoubleStrike(true);
    $printer -> text("32212000000014  MON, 05:00 PM");
    $printer->  text("\n");

    $printer -> selectPrintMode();
    $printer-> setDoubleStrike(true);
    $printer -> text("3/3/2020, Pants - Lined/");
    $printer->  text("\n");

    $printer->  feed();
    $connector -> write("\x1bi");

    $printer -> selectPrintMode();
    $printer-> setDoubleStrike(true);
    $printer -> text("SPANTIK LAB       In:3/3/2020");
    $printer->  text("\n");

    $printer -> selectPrintMode(P::MODE_DOUBLE_HEIGHT);
    $printer-> setDoubleStrike(true);
    $printer -> text("32212000000014   MON, 05:00 PM");
    $printer->  text("\n");

    $printer -> selectPrintMode();
    $printer-> setDoubleStrike(true);
    $printer -> text("Extra Tag");
    $printer->  text("\n");
    $printer->  feed();
    $printer->  feed();
    $connector -> write("\x1bi");

    //TAG END
   // $connector -> write("\x1bi");
    $printer -> cut(P::CUT_FULL,1);
    $printer -> close();

    $printer_result = 'success';
}
catch(Exception $e)
{
    $printer_result = 'failed';
   // $printer_result = $e -> getMessage();
}

WhatsApp Image 2020-03-04 at 4 07 40 AM

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

1 participant