0
I’m having difficulty generating barcodes in PHP, by default code39
, containing 10 digits (numbers only), for printing the web page containing the barcode in thermal printers.
I have tested several classes, but have error in optical reading.
Could someone indicate a good PHP class to generate barcode in the default code39
and allowing the height and width of the barcode to be adjusted?
Preferably, something that can be used as follows:
<img src="/barcode.php?code=' . $cod_barras . '&largura=180&altura=80" />
Important: I need it to work without any dependency other than PHP and the library GD
.
Thanks in advance for any help!
I usually use one, but it’s for Laravel 4 and 5. It’s called Milon Barcode.
– Wallace Maxters
Thanks for your attention, but I need it to work without any dependency beyond the GD library.
– Allan Andrade
Can you install where? I use packagist. There you find anything for php
– Wallace Maxters
Buddy, look at this https://github.com/picqer/php-barcode-generator
– Wallace Maxters
Wallace Maxters: php-Barcode-Enerator got wider than the coil of the thermal printer... so when it resizes to smaller width it gets poor quality.
– Allan Andrade
No way to configure lib resolution?
– Wallace Maxters
I lowered the resolution to 1px. In the inkjet printer is good, but in the thermal (Elgin i9) the lines come out a little "dotted". Trying several times the reader can even read, but it is not the ideal.
– Allan Andrade