Closed aliibrahimroshan closed 2 years ago
Unfortunately my TM-U220B has no auto-cutter, so I can't do much to debug this on my own.
Do you have any way of determining which commands the other application is sending? If you can print it to a file or get a hexdump, then we would know for sure.
The only other alternative is to send some experimental commands, and see if you can find one to issue manually. ESC i
and ESC m
are candidates. On my TM-T20II, I can get cuts with no line feed via ESC i
, for example, so this may be worth a shot-
$connect -> write("Hello\n\x1biWorld\n\x1bi");
Keep in mind that the cutter and print position are separated by around 27mm, so I would expect that you need to issue a cut command after already beginning the output of the next ticket. The measurements are described in the technical reference guide from Epson here.
Hi Mike,
Actaully i dont have the source code of the application that how it is cutting in the clients previous app but it working perfect on clients previous application.
Should give it cut command first and then text ?? or could you please explain me more about ESC i and ESC m commands that you mentioned in your reply.
Thanks you so much :)
incase if any one is facing the same issue i did this after wasting too much paper :) 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();
}
Hi , Im junior windows application developer Im having the same issue, some space is waste by auto feed, im also looking for laundry Tag print by using tm u220, by using windows form application can anybody help me to get a solution ,
Hi Mike,
First of all thanks for such a use full library.its helping us alot.
I m trying the to print with EPSON TM-U220 Receipt . it is adding extra spacewhen cut and new print.. i want 2 prints at a time but it is taking too much space after cut plz see the result.
here is my code
============================== Here is the result
================================== With same printer but another application the result is perfect .which i want
Thanks :)