• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Barcode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Zend_Barcode的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Barcode类的具体用法?PHP Zend_Barcode怎么用?PHP Zend_Barcode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Zend_Barcode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: save_barcode

 public function save_barcode($text = NULL, $bcs = 'code39', $height = 56, $stext = 1, $width = 256)
 {
     $drawText = $stext != 1 ? FALSE : TRUE;
     $this->load->library('zend');
     $this->zend->load('Zend/Barcode');
     $barcodeOptions = array('text' => $text, 'barHeight' => $height, 'drawText' => $drawText);
     $rendererOptions = array('imageType' => 'png', 'horizontalPosition' => 'center', 'verticalPosition' => 'middle');
     //'width' => $width
     $image = Zend_Barcode::draw($bcs, 'image', $barcodeOptions, $rendererOptions);
     //header ('Content-type: image/png');
     if (imagepng($image, 'assets/uploads/barcode' . $this->session->userdata('user_id') . '.png')) {
         imagedestroy($image);
         $bc = file_get_contents('assets/uploads/barcode' . $this->session->userdata('user_id') . '.png');
         $bcimage = base64_encode($bc);
         return $bcimage;
     }
     return FALSE;
 }
开发者ID:NimzyMaina,项目名称:sma,代码行数:18,代码来源:Sma.php


示例2: set_barcode

 private function set_barcode($code)
 {
     $this->load->library('Zend');
     $this->zend->load('Zend/Barcode');
     //generate barcode
     Zend_Barcode::render('code128', 'image', array('text' => $code), array());
 }
开发者ID:heruprambadi,项目名称:barcode,代码行数:7,代码来源:Barcode.php


示例3: zend

 public function zend()
 {
     $this->load->library('library_zend');
     $test = Zend_Barcode::draw('ean8', 'image', array('text' => 'abc123'), array());
     //var_dump($test);
     imagejpeg($test, 'temp/' . uniqid() . '.jpg', 100);
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:7,代码来源:test001.php


示例4: getBarcodeImgSource

 public function getBarcodeImgSource()
 {
     $type = "code128";
     $orderId = $this->getOrder()->getIncrementId();
     $barcodeOptions = array('text' => $orderId, 'fontSize' => "14", 'withQuietZones' => true);
     $rendererOptions = array();
     $imageResource = Zend_Barcode::factory($type, 'image', $barcodeOptions, $rendererOptions);
     return $imageResource;
 }
开发者ID:javik223,项目名称:Evron-Magento,代码行数:9,代码来源:Printinvoice.php


示例5: set_barcode

 function set_barcode($code)
 {
     //load library
     $this->load->library("zend");
     //load in folder Zend
     $this->zend->load('Zend/Barcode');
     //generate barcode
     Zend_Barcode::render('code128', 'image', array('text' => $code), array());
 }
开发者ID:DeRossi,项目名称:Training_CI,代码行数:9,代码来源:Barcode.php


示例6: set_bar

 private function set_bar($text)
 {
     $this->load->library('zend');
     $this->zend->load('Zend/Barcode');
     /*$barcodeOptions = array('text' => $text);
     		$rendererOptions = array();
     		Zend_Barcode::factory('code39', 'image', $barcodeOptions, $rendererOptions)->render();*/
     Zend_Barcode::render('code128', 'image', array('text' => $text), array());
 }
开发者ID:virbo,项目名称:ci_barcode,代码行数:9,代码来源:Welcome.php


示例7: barcode

 public function barcode()
 {
     $code = $this->uri->segment(3, 0);
     //load library
     //load in folder Zend
     $this->zend->load('Zend/Barcode');
     //generate barcode
     $barcode = Zend_Barcode::render('code128', 'image', array('text' => $code), array());
 }
开发者ID:jishnuvyala,项目名称:lis,代码行数:9,代码来源:card.php


示例8: barcode

 private function barcode()
 {
     $code = $this->uri->segment(3, 0);
     //load library
     $this->load->library('zend');
     //load in folder Zend
     $this->zend->load('Zend/Barcode');
     //generate barcode
     Zend_Barcode::render('code39', 'image', array('text' => $code), array());
 }
开发者ID:jishnuvyala,项目名称:lis,代码行数:10,代码来源:test.php


示例9: generateBarcodeAction

 public function generateBarcodeAction()
 {
     $product_code = $this->getRequest()->getParam('product_code');
     header('Content-type: image/png');
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $barcodeOptions = array('text' => "{$product_code}", 'barHeight' => 40);
     $rendererOptions = array();
     $renderer = Zend_Barcode::factory('code128', 'image', $barcodeOptions, $rendererOptions)->render();
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:10,代码来源:IndexController.php


示例10: barcodeAction

 /**
  * This can be used to generate barcodes, use the action
  *
  * /openrosa/barcode/code/<tokenid>
  *
  * example:
  * /openrosa/barocde/code/22pq-grkq
  *
  * The image will be a png
  */
 public function barcodeAction()
 {
     $code = $this->getRequest()->getParam('code', 'empty');
     \Zend_Layout::getMvcInstance()->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $barcodeOptions = array('text' => $code);
     $rendererOptions = array();
     $barcode = \Zend_Barcode::render('code128', 'image', $barcodeOptions, $rendererOptions);
     $barcode->render();
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:20,代码来源:OpenrosaAction.php


示例11: barcode_generate

 function barcode_generate($kode)
 {
     $houseno = $this->post('houseno');
     //$height =25;//tinggi barcode
     //$width = 3; //ketebalan barcode
     $this->load->library('zend');
     $this->zend->load('Zend/Barcode');
     $barcodeOPT = array('text' => $kode, 'barHeight' => $height, 'factor' => $width);
     $renderOPT = array();
     $render = Zend_Barcode::factory('code128', 'image', $barcodeOPT, $renderOPT)->render();
 }
开发者ID:raflesngln,项目名称:att-system,代码行数:11,代码来源:connote_print.php


示例12: barcode

 function barcode($code)
 {
     // We load her library's reading Zend.php file that contains the loader
     // For existing files in the folder Zend
     $this->load->library('zend');
     // Load that is in a folder Zend
     $this->zend->load('Zend/Barcode');
     // Generate barcodenya
     // $ Code = 12345abc;
     Zend_Barcode::render('code128', 'image', array('text' => $code), array());
 }
开发者ID:VNOME,项目名称:lims_new,代码行数:11,代码来源:new_test_request_controller.php


示例13: genBarcode

 public function genBarcode($txt = '', $devMode = false)
 {
     $txt = $devMode ? 'Test Generate Barcode' : $txt;
     $this->CI->load->library('zend');
     $this->CI->zend->load('Zend/Barcode');
     $barcodeOption = array('text' => $txt, 'barHeight' => 30, 'font' => 2);
     $renderOption = array('');
     $render = Zend_Barcode::render('code128', 'image', $barcodeOption, $renderOption);
     return $render;
     //exit;
 }
开发者ID:Nirun,项目名称:HAsong01ha,代码行数:11,代码来源:Util.php


示例14: testDrawWithExistantResourceReturnResource

 public function testDrawWithExistantResourceReturnResource()
 {
     Zend_Barcode::setBarcodeFont(dirname(__FILE__) . '/../Object/_fonts/Vera.ttf');
     $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
     $this->_renderer->setBarcode($barcode);
     $pdfResource = new Zend_Pdf();
     $this->_renderer->setResource($pdfResource);
     $resource = $this->_renderer->draw();
     $this->assertTrue($resource instanceof Zend_Pdf);
     $this->assertSame($resource, $pdfResource);
     Zend_Barcode::setBarcodeFont('');
 }
开发者ID:jsnshrmn,项目名称:Suma,代码行数:12,代码来源:PdfTest.php


示例15: set_barcode

 private function set_barcode($code)
 {
     //load library
     $this->load->library('zend');
     //load in folder Zend
     $this->zend->load('Zend/Barcode');
     //generate barcode
     //Zend_Barcode::render('code128', 'image', array('text'=>$code), array());
     $barcodeOptions = array('text' => $code, 'barHeight' => 20, 'factor' => 1);
     $rendererOptions = array();
     $renderer = Zend_Barcode::factory('code128', 'image', $barcodeOptions, $rendererOptions)->render();
 }
开发者ID:projukti,项目名称:dumkal,代码行数:12,代码来源:Main.php


示例16: gambar

 function gambar($kode)
 {
     $height = 60;
     //tinggi barcode
     $width = 2;
     //ketebalan barcode
     $this->load->library('zend');
     $this->zend->load('Zend/Barcode');
     $barcodeOPT = array('text' => $kode, 'barHeight' => $height, 'factor' => $width);
     $renderOPT = array();
     $render = Zend_Barcode::factory('code128', 'image', $barcodeOPT, $renderOPT)->render();
 }
开发者ID:raflesngln,项目名称:att-system,代码行数:12,代码来源:barcode.php


示例17: generate

 public function generate($code)
 {
     //load library
     $this->load->library('zend');
     //load in folder Zend
     $this->zend->load('Zend/Barcode');
     //generate barcode
     //Zend_Barcode::render('code128', 'image', array('text'=>$code), array());
     $barcodeOptions = array('text' => $code);
     $rendererOptions = array('imageType' => 'png', 'horizontalPosition' => 'center', 'verticalPosition' => 'middle');
     $imageResource = Zend_Barcode::factory('code39', 'image', $barcodeOptions, $rendererOptions)->render();
     return $imageResource;
 }
开发者ID:ailuropodagit,项目名称:tttkkk,代码行数:13,代码来源:Barcode.php


示例18: getImage

 /**
  * Return barcode image
  */
 public function getImage($barcode)
 {
     $barcodeStandard = Mage::getStoreConfig('barcodelabel/general/standard');
     // WARNING option withChecksum = false is ignored for EAN 13 ! we have to cut the barcode if ean13 is enable
     if ($barcodeStandard == "Ean13") {
         $barcode = substr($barcode, 0, 12);
     }
     $barcodeOptions = array('text' => $barcode);
     // barcode attribut (not sku!)
     $rendererOptions = array();
     // default = empty
     $factory = Zend_Barcode::factory($barcodeStandard, 'image', $barcodeOptions, $rendererOptions);
     $image = $factory->draw();
     return $image;
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:18,代码来源:BarcodePicture.php


示例19: barcode

	function barcode () {
	
		require 'Zend/Barcode.php';
		//require 'Zend/Barcode/Object/Code39.php';
		//require 'Zend/Barcode/Renderer/Image.php';
		
		$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
		$rendererOptions = array();
		
		try {
			$barcode = Zend_Barcode::factory('code39', 'image', $barcodeOptions, $rendererOptions);
		} catch (Exception $e) {
		    echo 'Caught exception: ',  $e->getMessage(), "\n";
		}
		
		print_r($barcode);
	}
开发者ID:G-LAB,项目名称:glab-cms,代码行数:17,代码来源:image.php


示例20: testDrawWithExistantResourceReturnResource

 public function testDrawWithExistantResourceReturnResource()
 {
     Zend_Barcode::setBarcodeFont(dirname(__FILE__) . '/../Object/_fonts/Vera.ttf');
     $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
     $this->_renderer->setBarcode($barcode);
     $svgResource = new DOMDocument();
     $rootElement = $svgResource->createElement('svg');
     $rootElement->setAttribute('xmlns', "http://www.w3.org/2000/svg");
     $rootElement->setAttribute('version', '1.1');
     $rootElement->setAttribute('width', 500);
     $rootElement->setAttribute('height', 300);
     $svgResource->appendChild($rootElement);
     $this->_renderer->setResource($svgResource);
     $resource = $this->_renderer->draw();
     $this->assertTrue($resource instanceof DOMDocument);
     $this->assertSame($resource, $svgResource);
     Zend_Barcode::setBarcodeFont('');
 }
开发者ID:netvlies,项目名称:zf,代码行数:18,代码来源:SvgTest.php



注:本文中的Zend_Barcode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Barcode_Object_ObjectAbstract类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Auth_Storage_Session类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap