php-aidc / label-printer Goto Github PK
View Code? Open in Web Editor NEWA PHP package for label printers (Honeywell, Intermec, TSC)
License: MIT License
A PHP package for label printers (Honeywell, Intermec, TSC)
License: MIT License
Hi, I found this problem printing with this library: when I launch the print the n time, it also print all the past n-1 prints overlapped in the same label. I don't know what could be cause this strange behaviour.
Any tips on how to print via CUPS or lpd? (e.g. lpd://192.168.0.5/labelprinter)
Hi, i try to integrate with honeywell label printer and got error
local.ERROR: {"exception":"[object] (DomainException(code: 0): at /vendor/php-aidc/label-printer/src/Printer.php:37)
I already make connection between pc and printer, pc able to reach printer when browse printer IP.
Thanks for this great package!
Originally posted by Xelosy July 20, 2022
Hi i get the following error on Batch Printing:
Fatal error: Uncaught ErrorException: fwrite(): send of 8192 bytes failed with errno=10035 A non-blocking socket operation could not be completed immediately. in C:\inetpub\wwwroot\Intranet\Label\vendor\php-aidc\label-printer\src\Connector\NetworkConnector.php:69 Stack trace: #0 C:\inetpub\wwwroot\Intranet\Label\vendor\php-aidc\label-printer\src\Connector\NetworkConnector.php(71): PhpAidc\LabelPrinter\Connector\NetworkConnector->flushErrors() #1 C:\inetpub\wwwroot\Intranet\Label\vendor\php-aidc\label-printer\src\Printer.php(40): PhpAidc\LabelPrinter\Connector\NetworkConnector->write('SIZE 50 mm,25 m...') #2 C:\inetpub\wwwroot\Intranet\Label\Label.php(466): PhpAidc\LabelPrinter\Printer->print(Object(PhpAidc\LabelPrinter\Label\Batch)) #3 {main} thrown in C:\inetpub\wwwroot\Intranet\Label\vendor\php-aidc\label-printer\src\Connector\NetworkConnector.php on line 69
My Code:
'''
$batch= (new Batch());
foreach ($_POST as $key => $value) {
$label = Label::create(Unit::MM(), 50, 25); //Unit, Width, Height
$label->charset(Charset::UTF8());
$label->add(new Clear());
$label->add(new Raw("DENSITY " . $temp));
$label->add(Element::textLine(($xFactor * 10), ($yFactor * 10), $current, 'arial.TTF', 25)); // x, y , text, font, size
..... much more $label->add( some elements) ......
$batch->add($label);
}
$printer->print($batch);
'''
Its working for a few labels and then the error message from above appears. Is there a problem how i create the label in the foreach loop?
Hello! I'm using TSC TE310 connected via ethernet, tried all examples, but printer always prints completely empty labels, no text or anything on them.
Where problem could be ? How to debug it ? :(
Hi everyone,
For printing our product label, we are determining to use this package because this one would be powerful in our case. So created spike shortly and run it on the local connecting to the printer, but I am getting error as following:
Fatal error: Uncaught DomainException in vendor/php-aidc/label-printer/src/Printer.php:37
I am not sure what's happened because it's first time to use this one for me.
That would be appreciated with your helps.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.