Hello Jonathan, I am not sure what I have changed but now the barcode appears properly in IE. It might be related to cache or maybe permissions problem.
I was not able to use pear's package due to the same problem. But now will be able to use ZF's barcode component. Thanks On Wed, Oct 20, 2010 at 3:22 PM, Jonathan Maron <[email protected]> wrote: > Hello scs > > Are you sure that the page that is serving up the actual image data is > sending the correct HTTP header for GIF data? > > Jonathan > -----Original Message----- > From: scs <[email protected]> > Date: Wed, 20 Oct 2010 11:50:39 > To: <[email protected]> > Cc: Laurens van Vliet<[email protected]> > Subject: Re: [fw-general] How can I render a Zend_Barcode inside a html page? > By the way, > I cannot see the barcode image on IE8. It show a broken image. > > The code is the same code as below: > $this->_helper->layout->disableLayout(); > $this->_helper->viewRenderer->setNoRender(); > > $barcodeOptions = array('text' => '28810105487'); > $rendererOptions = array('imageType' => 'gif'); > Zend_Barcode::render('code39', 'image', $barcodeOptions, > $rendererOptions); > > The same happened in the past to me when I implemented pear's barcode > class, too. > Anybody has experienced the same problem? > > Firefox has no problem. Just IE! > Development server: Debian, php 5.2.x, zf: 1.10.6 > > scs > > > > On Wed, Oct 20, 2010 at 11:42 AM, scs <[email protected]> wrote: >> This will work. >> <img src="<?php echo $this->url(array('controller' => >> 'your_controller', 'action'=> 'your_action')); ?>" alt="barcode" /> >> >> scs >> >> On Wed, Oct 20, 2010 at 11:32 AM, Vincent de Lau <[email protected]> wrote: >>>>Van: Laurens van Vliet [mailto:[email protected]] >>> >>>> ... >>>> <div> >>>> <?php echo $this->action('barcode', 'label', null, array()); ?> >>>> </div> >>>> ... >>> >>> >>> This is probably not what you want... The action helper (labeled as evil) >>> includes the output of another action inside the view. >>> >>> You would want somthing like >>> >>> <img src="<?php echo $this->action(array('controller' => 'barcode', 'action' >>> => 'label', 'default'); ?>" alt="barcode" /> >>> >>> Vincent de Lau >>> [email protected] >>> >>> >> >
