Exemplo n.º 1
5
 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());
 }
Exemplo n.º 2
1
 public function barcodeAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $barcodeOptions = array('text' => '28810105487');
     $rendererOptions = array('topOffset' => 50);
     $rendererOptions = array('imageType' => 'gif');
     Zend_Barcode::render('code39', 'image', $barcodeOptions, $rendererOptions);
 }
Exemplo n.º 3
0
 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());
 }
Exemplo n.º 4
0
 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());
 }
Exemplo n.º 5
0
 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());
 }
Exemplo n.º 6
0
 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());
 }
 /**
  * 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();
 }
Exemplo n.º 8
0
 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;
 }
 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());
 }
Exemplo n.º 10
0
 /**
  * Generate barcode for books.
  * 
  * Generate barcode in CODE39.
  * @param string text - The text to be printed as barcode.
  */
 public function generatecodeAction()
 {
     $request = $this->getRequest();
     $text = $request->getParam('text');
     $format = $request->getParam('format', 'CODE39');
     $barcodeOptions = array('text' => $text);
     $rendererOptions = array();
     $this->getResponse()->setHeader('Cache-Control', 'public, proxy-revalidate')->setHeader('Set-Cookie', '', true);
     Zend_Barcode::render($format, 'image', $barcodeOptions, $rendererOptions);
 }
Exemplo n.º 11
0
 function barcode($kode = "")
 {
     $this->load->library('zend');
     $this->zend->load('Zend/Barcode');
     Zend_Barcode::render('code128', 'image', array('text' => $kode, 'factor' => 3), array('imageType' => 'png'));
 }
Exemplo n.º 12
0
 public function barcode($id)
 {
     $this->load->library('zend');
     $this->zend->load('Zend/Barcode');
     Zend_Barcode::render('code128', 'image', array('text' => $id, 'barHeight' => 100), array());
 }
Exemplo n.º 13
0
 function gen_barcode($item_code = NULL, $bcs = 'code39', $height = 60, $text = 1)
 {
     $drawText = $text != 1 ? FALSE : TRUE;
     $this->load->library('zend');
     $this->zend->load('Zend/Barcode');
     $barcodeOptions = array('text' => $item_code, 'barHeight' => $height, 'drawText' => $drawText);
     $rendererOptions = array('imageType' => 'png', 'horizontalPosition' => 'center', 'verticalPosition' => 'middle');
     $imageResource = Zend_Barcode::render($bcs, 'image', $barcodeOptions, $rendererOptions);
     return $imageResource;
 }
Exemplo n.º 14
0
 /**
  * genera código de barra
  */
 public function generaCodigoBarra()
 {
     // $this->set_barcode( $_GET['codigo'] );
     $codigo = empty($_GET['codigo']) ? '123456890' : $_GET['codigo'];
     //load library
     $this->load->library('zend');
     //load in folder Zend
     $this->zend->load('Zend/Barcode');
     //generate barcode
     Zend_Barcode::render('code128', 'image', array('text' => $codigo), array());
 }