How to remove barcode text from Zend_Barcode
-
13-12-2019 - |
Question
This is related to magento packing slip printing , I have added a barcode using Zend_Barcode function but when draw barcode it automatically include the barcode text just underneath the barcode image. I need to remove it , following is my code
<?php
$code = "barcode-text";
$file = Zend_Barcode::draw('code128', 'image', array('text' => $code), array());
$code = time().$code;
$store_image = imagepng($file,Mage::getBaseDir().DS.'barcodes'.DS."{$code}.png");
$page->drawImage($image, 300,$this->y-40,430,$this->y+10);
Solution
agh found the solution
$file = Zend_Barcode::draw('code128', 'image', array('text' => $code, 'drawText' => false), array());
just need to add 'drawText' => false
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange