Board index   FAQ   Search  
Register  Login
Board index PHP PEAR and PECL

Pear Image_Barcode

Do you have questions regarding Pecl or Pear? ask here!

Moderators: macek, egami, gesf

Pear Image_Barcode

Postby cahalsall » Fri Oct 14, 2011 4:10 am

I have managed to install Pear Image_Barcode and get my scripts to display said barcodes on web pages without any problems, including creating them from text and numeric values from mysql tables.

I'm just feeling my way here and this is were I got stuck.

Code to generate Barcode:
Code: Select all
<?php //genbarcode.php
require_once 'Image/Barcode.php';
$bar_code = $_GET['barcode'];
//   $bar_code = "1023";
   Image_Barcode::draw($bar_code, 'code128', 'png');
?>


I use the following to retrieve and display these Barcodes on web pages.
Code: Select all
'<img src="genbarcode.php?barcode=' . $empno . '" />'


The tutorial I was using says to if you don't want to display the images and would like to do other stuff with them, you would modify the image creation portion of the script like this:

Code: Select all
Image_Barcode::draw($bar_code, 'code128', 'png', false);


What I really need to do now is to retrieve this image into some kind of container where I can get a handle on it and store is as a file or insert it into a blob field.

I have been trying out various 'createimagefrom' functions to no avail.

Any help would be greatly appreciated.


Charles
cahalsall
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Oct 14, 2011 3:41 am

Return to PEAR and PECL

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron