Here's what I do to render in a view: use Zend_Barcode_Renderer_Image as BarcodeRenderer;
$renderer = new BarcodeRenderer(); $renderer->setBarcode($barcode); $renderer->render(); Zend_Controller_Front::getInstance() ->getResponse() ->setHeader('Content-Type', 'image/' . $renderer->getImageType(), true) ->setHeader('Cache-Control', 'cache, must-revalidate, max-age=0', true) ->setHeader('Pragma', 'public', true); Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 13 March 2012 09:20, Jurian Sluiman-3 [via Zend Framework Community] < ml-node+s634137n4468476...@n4.nabble.com> wrote: > 2012/3/13 Marco Pivetta <[hidden > email]<http://user/SendEmail.jtp?type=node&node=4468476&i=0>> > > > > Yeah, I can check tomorrow at work how I did that... Anyway, if you want > to > > bind the image into an html, then you should base64 encode its contents. > I > > wouldn't suggest that anyway. > > Marco Pivetta > > > > Some time ago I wrote a ZF1 view helper to display barcodes, which can be > found here: https://gist.github.com/1318966. Usage: > > <img src="data:image/png;base64,<?= this->barcode('my-code')?>"> > -- > Jurian Sluiman > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://zend-framework-community.634137.n4.nabble.com/rendering-barcode-tp4467865p4468476.html > To unsubscribe from Zend Framework Community, click > here<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=634137&code=b2NyYW1pdXNAZ21haWwuY29tfDYzNDEzN3wxNzE0OTI1MTk4> > . > NAML<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/rendering-barcode-tp4467865p4468531.html Sent from the Zend Framework mailing list archive at Nabble.com.