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

QR codes are not supported on your printer (Epson TM T-20) #1327

Open
ThiagoBossi opened this issue Apr 26, 2024 · 0 comments
Open

QR codes are not supported on your printer (Epson TM T-20) #1327

ThiagoBossi opened this issue Apr 26, 2024 · 0 comments

Comments

@ThiagoBossi
Copy link

ThiagoBossi commented Apr 26, 2024

Hello! I have an Epson TM T-20 installed, and i'm trying to print a QrCode.
My printer is connected to my computer by USB cable, and installed with the spooler driver.

When i try to print the QrCode, i get this error:

Fatal error: Uncaught Exception: QR codes are not supported on your printer. in C:\xampp\htdocs\vendor\mike42\escpos-php\src\Mike42\Escpos\Printer.php:717 Stack trace: #0 C:\xampp\htdocs\index.php(108): Mike42\Escpos\Printer->qrCode('01234567890', 0, 3, 2) #1 C:\xampp\htdocs\index.php(134): imprimirDados(Array) #2 {main} thrown in C:\xampp\htdocs\vendor\mike42\escpos-php\src\Mike42\Escpos\Printer.php on line 717

My code is this:

$profile = CapabilityProfile::load("simple");
$connector = new WindowsPrintConnector("epsontmt20");
$printer = new Printer($connector, $profile);

$printer->setPrintLeftMargin(10);
$printer->feed(2);
    
$printer->qrCode("01234567890", Printer::QR_ECLEVEL_L, 3, Printer::QR_MODEL_2);
$printer->feed(1);

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

Is there any solution to this problem?
I would really apreciate any help! Thanks in advance.

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