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);
Was it helpful?

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
scroll top